Date: Fri, 01 Jan 2021 15:41:58 -0800 From: Ravi Pokala <rpokala@freebsd.org> To: Ryan Libby <rlibby@FreeBSD.org>, <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org> Subject: Re: d021434a7960 - main - openzfs: fix gcc kernel module builds Message-ID: <AB5544D5-7E80-4E0A-8AD8-C89E067A5F18@panasas.com> In-Reply-To: <202012272303.0BRN3egB008714@gitrepo.freebsd.org> References: <202012272303.0BRN3egB008714@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message----- From: <owner-src-committers@freebsd.org> on behalf of Ryan Libby <rlibby@FreeBSD.org> Date: 2020-12-27, Sunday at 15:03 To: <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org> Subject: git: d021434a7960 - main - openzfs: fix gcc kernel module builds The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=d021434a796008efbb93616f5297ed2f55a1a230 commit d021434a796008efbb93616f5297ed2f55a1a230 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2020-12-27 22:33:13 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2020-12-27 22:33:13 +0000 openzfs: fix gcc kernel module builds Hi Ryan, This is listed as "openzfs", but the vast majority of it is in dtrace...? -Ravi (rpokala@) - Suppress -Wredundant-decls. Ultimately this warning is harmless in any case, and it does not look like there is a simple way to avoid redundant declarations in this case without a lot of header pollution (e.g. having openzfs's shim param.h pulling in sys/kernel.h for hz). - Suppress -Wnested-externs, which is useless anyway. Unfortunately it was not sufficient just to modify OPENZFS_CFLAGS, because the warning suppressions need to appear on the command line after they are explicitly enabled by CWARNFLAGS from sys/conf/kern.mk, but OPENZFS_CFLAGS get added before due to use of -I for the shims. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27685 --- sys/conf/kmod.mk | 4 +++- sys/modules/dtrace/dtaudit/Makefile | 1 + sys/modules/dtrace/dtmalloc/Makefile | 1 + sys/modules/dtrace/dtnfscl/Makefile | 1 + sys/modules/dtrace/dtrace/Makefile | 1 + sys/modules/dtrace/fasttrap/Makefile | 1 + sys/modules/dtrace/fbt/Makefile | 1 + sys/modules/dtrace/profile/Makefile | 1 + sys/modules/dtrace/prototype/Makefile | 1 + sys/modules/dtrace/sdt/Makefile | 1 + sys/modules/dtrace/systrace/Makefile | 1 + sys/modules/dtrace/systrace_freebsd32/Makefile | 1 + sys/modules/dtrace/systrace_linux/Makefile | 1 + sys/modules/dtrace/systrace_linux32/Makefile | 1 + sys/modules/opensolaris/Makefile | 1 + sys/modules/zfs/Makefile | 1 + 16 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 54ecbdf69c88..dcc00829b831 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -540,7 +540,9 @@ OPENZFS_CFLAGS= \ -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h - +OPENZFS_CWARNFLAGS= \ + -Wno-nested-externs \ + -Wno-redundant-decls .include <bsd.dep.mk> .include <bsd.clang-analyze.mk> diff --git a/sys/modules/dtrace/dtaudit/Makefile b/sys/modules/dtrace/dtaudit/Makefile index 72cdf03f4bc3..3571bcbb7ea2 100644 --- a/sys/modules/dtrace/dtaudit/Makefile +++ b/sys/modules/dtrace/dtaudit/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile index 910f8f360e80..ffde4f811ee8 100644 --- a/sys/modules/dtrace/dtmalloc/Makefile +++ b/sys/modules/dtrace/dtmalloc/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtnfscl/Makefile b/sys/modules/dtrace/dtnfscl/Makefile index 6184ad183fc6..d28641e51ec8 100644 --- a/sys/modules/dtrace/dtnfscl/Makefile +++ b/sys/modules/dtrace/dtnfscl/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 0bedcaa12fe7..80278fc83a32 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -59,6 +59,7 @@ dtrace_asm.o: assym.inc CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h CFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CWARNFLAGS+= -Wno-parentheses CWARNFLAGS+= -Wno-uninitialized CWARNFLAGS+= -Wno-cast-qual diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile index 1be1b97736ea..0eecfcb11aab 100644 --- a/sys/modules/dtrace/fasttrap/Makefile +++ b/sys/modules/dtrace/fasttrap/Makefile @@ -26,5 +26,6 @@ SRCS+= u8_textprep.c CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS+= -Wno-unused diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile index 288c8cafa817..360d92000776 100644 --- a/sys/modules/dtrace/fbt/Makefile +++ b/sys/modules/dtrace/fbt/Makefile @@ -23,3 +23,4 @@ CFLAGS+= -I${SYSDIR}/cddl/dev/fbt .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile index aa36f9a2dfba..b3eec9a19f23 100644 --- a/sys/modules/dtrace/profile/Makefile +++ b/sys/modules/dtrace/profile/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile index 476c567a4dc0..189d6c2df2a2 100644 --- a/sys/modules/dtrace/prototype/Makefile +++ b/sys/modules/dtrace/prototype/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile index 2f6432e4a71f..a025848e3a60 100644 --- a/sys/modules/dtrace/sdt/Makefile +++ b/sys/modules/dtrace/sdt/Makefile @@ -12,3 +12,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile index 3e122f70da25..2250a7418193 100644 --- a/sys/modules/dtrace/systrace/Makefile +++ b/sys/modules/dtrace/systrace/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_freebsd32/Makefile b/sys/modules/dtrace/systrace_freebsd32/Makefile index 4661633f9a62..3b77bc4c6d0e 100644 --- a/sys/modules/dtrace/systrace_freebsd32/Makefile +++ b/sys/modules/dtrace/systrace_freebsd32/Makefile @@ -14,3 +14,4 @@ CFLAGS+= -DFREEBSD32_SYSTRACE .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_linux/Makefile b/sys/modules/dtrace/systrace_linux/Makefile index 7dbd88ffb5f0..56f422dfb9e5 100644 --- a/sys/modules/dtrace/systrace_linux/Makefile +++ b/sys/modules/dtrace/systrace_linux/Makefile @@ -15,3 +15,4 @@ CFLAGS+= -DLINUX_SYSTRACE .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_linux32/Makefile b/sys/modules/dtrace/systrace_linux32/Makefile index 81aa1b7de9df..febd4a0c1bab 100644 --- a/sys/modules/dtrace/systrace_linux32/Makefile +++ b/sys/modules/dtrace/systrace_linux32/Makefile @@ -15,3 +15,4 @@ CFLAGS+= -DLINUX32_SYSTRACE .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 1b5dd6dffcfb..536b9637cd3c 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -34,3 +34,4 @@ IGNORE_PRAGMA= 1 .include <bsd.kmod.mk> CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 2318b9b155d3..d2617dc6bdc6 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -279,6 +279,7 @@ SRCS+= zfs_zstd.c \ .include <bsd.kmod.mk> +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CFLAGS.gcc+= -Wno-pointer-to-int-cast
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AB5544D5-7E80-4E0A-8AD8-C89E067A5F18>