From owner-dev-commits-src-all@freebsd.org Fri Jan 1 23:42:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C508E4B8288; Fri, 1 Jan 2021 23:42:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D71lG5Cd2z4Wdh; Fri, 1 Jan 2021 23:42:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 150312F5E8; Fri, 1 Jan 2021 23:42:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.44.20121301 Date: Fri, 01 Jan 2021 15:41:58 -0800 Subject: Re: d021434a7960 - main - openzfs: fix gcc kernel module builds From: Ravi Pokala To: Ryan Libby , , , Message-ID: Thread-Topic: d021434a7960 - main - openzfs: fix gcc kernel module builds References: <202012272303.0BRN3egB008714@gitrepo.freebsd.org> In-Reply-To: <202012272303.0BRN3egB008714@gitrepo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 23:42:02 -0000 -----Original Message----- From: on behalf of Ryan Libby Date: 2020-12-27, Sunday at 15:03 To: , , 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 AuthorDate: 2020-12-27 22:33:13 +0000 Commit: Ryan Libby 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 .include 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 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 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 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 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 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 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 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 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 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 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 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 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 +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CFLAGS.gcc+= -Wno-pointer-to-int-cast