From 1ee339e257b39cdfad7995f98336e3cd0edbc9a5 Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Thu, 24 Dec 2020 12:34:18 -0800 Subject: [PATCH] openzfs: fix gcc in-kernel builds Fix gcc builds of in-kernel modules using CDDL_CFLAGS (e.g. options ZFS). - Remove nonexistent include dirs for -Wmissing-include-dirs - Suppress -Wnested-externs, a useless warning - Sort and uniq warning flags while here Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27684 --- sys/conf/kern.pre.mk | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index cb1703097836..4a0663f49753 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -209,29 +209,27 @@ CDDL_CFLAGS= \ -nostdinc \ -include $S/modules/zfs/static_ccompile.h \ -I${ZINCDIR} \ - -I${ZINCDIR}/spl \ -I${ZINCDIR}/os/freebsd \ -I${ZINCDIR}/os/freebsd/spl \ -I${ZINCDIR}/os/freebsd/zfs \ -I$S/modules/zfs \ -I$S/contrib/openzfs/module/zstd/include \ - -I$S/contrib/openzfs/module/zstd/lib/freebsd/ \ ${CFLAGS} \ - -Wno-unknown-pragmas \ - -Wno-missing-prototypes \ - -Wno-undef \ - -Wno-strict-prototypes \ -Wno-cast-qual \ - -Wno-parentheses \ - -Wno-redundant-decls \ - -Wno-missing-braces \ - -Wno-uninitialized \ - -Wno-unused \ - -Wno-inline \ - -Wno-switch \ - -Wno-pointer-arith \ - -Wno-unknown-pragmas \ -Wno-duplicate-decl-specifier \ + -Wno-inline \ + -Wno-missing-braces \ + -Wno-missing-prototypes \ + -Wno-nested-externs \ + -Wno-parentheses \ + -Wno-pointer-arith \ + -Wno-redundant-decls \ + -Wno-strict-prototypes \ + -Wno-switch \ + -Wno-undef \ + -Wno-uninitialized \ + -Wno-unknown-pragmas \ + -Wno-unused \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h \ -I$S/cddl/contrib/opensolaris/uts/common \ -I$S -I$S/cddl/compat/opensolaris