From b59965a81ab3e54f1683aa69b9c9ad35ad99dd7e Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 17 Dec 2021 14:59:21 +0000 Subject: [PATCH] Disable a few warning flags that were introduced and enabled by default with LLVM 13. --- gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper | 5 ++++- sys/arch/amd64/conf/Makefile.amd64 | 5 +++-- sys/arch/arm64/conf/Makefile.arm64 | 3 ++- sys/arch/armv7/conf/Makefile.armv7 | 3 ++- sys/arch/i386/conf/Makefile.i386 | 5 +++-- sys/arch/loongson/conf/Makefile.loongson | 5 +++-- sys/arch/macppc/conf/Makefile.macppc | 5 +++-- sys/arch/octeon/conf/Makefile.octeon | 5 +++-- sys/arch/powerpc64/conf/Makefile.powerpc64 | 3 ++- sys/arch/riscv64/conf/Makefile.riscv64 | 3 ++- sys/arch/sparc64/conf/Makefile.sparc64 | 5 +++-- 11 files changed, 30 insertions(+), 17 deletions(-) diff --git a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper index 486aa67d24a..37c17f4bdc8 100644 --- a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper +++ b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.24 2021/11/23 10:30:08 robert Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.25 2021/12/17 14:59:21 patrick Exp $ .include @@ -8,6 +8,9 @@ SUBDIRS= opcodes bfd CONF_SUBDIRS= opcodes bfd CFLAGS+= ${PIE_DEFAULT} +.if ${COMPILER_VERSION:Mclang} +CFLAGS+= -Wno-unused-but-set-variable -Wno-null-pointer-subtraction +.endif XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDSTATIC}" # This allows moving the whole binutils installation around for # testing purposes diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index 5295aeae69c..289e60926d3 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.122 2021/11/27 00:49:21 jsg Exp $ +# $OpenBSD: Makefile.amd64,v 1.123 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -70,7 +70,8 @@ CMACHFLAGS+= -mno-retpoline .endif .if ${COMPILER_VERSION:Mclang} NO_INTEGR_AS= -no-integrated-as -CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant .endif DEBUG?= -g diff --git a/sys/arch/arm64/conf/Makefile.arm64 b/sys/arch/arm64/conf/Makefile.arm64 index c25537de309..3d81d8b1da7 100644 --- a/sys/arch/arm64/conf/Makefile.arm64 +++ b/sys/arch/arm64/conf/Makefile.arm64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.arm64,v 1.40 2021/11/27 00:49:21 jsg Exp $ +# $OpenBSD: Makefile.arm64,v 1.41 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -48,6 +48,7 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-pointer-sign \ -Wno-constant-conversion -Wno-address-of-packed-member \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant \ -Wframe-larger-than=2047 CMACHFLAGS= -march=armv8-a+nofp+nosimd \ diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index 248beb6a33e..d8fc7710cd6 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armv7,v 1.51 2021/11/27 00:49:21 jsg Exp $ +# $OpenBSD: Makefile.armv7,v 1.52 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -26,6 +26,7 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-pointer-sign \ -Wno-constant-conversion -Wno-address-of-packed-member \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant \ -Wframe-larger-than=2047 CMACHFLAGS= -msoft-float -march=armv7a diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 4903579d567..4dbf184eff0 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.141 2021/11/27 00:49:21 jsg Exp $ +# $OpenBSD: Makefile.i386,v 1.142 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -44,7 +44,8 @@ CMACHFLAGS+= -mretpoline .endif .if ${COMPILER_VERSION:Mclang} NO_INTEGR_AS= -no-integrated-as -CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant .endif DEBUG?= -g diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index c890376e852..c34f616551f 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.81 2021/11/27 00:49:21 jsg Exp $ +# $OpenBSD: Makefile.loongson,v 1.82 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -49,7 +49,8 @@ COPTIMIZE?= -Oz .if ${COMPILER_VERSION:Mclang} NO_INTEGR_AS= -no-integrated-as CMACHFLAGS+= -fomit-frame-pointer -CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant .endif DEBUG?= -g diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc index cc6aad65ffa..bd233e2fdac 100644 --- a/sys/arch/macppc/conf/Makefile.macppc +++ b/sys/arch/macppc/conf/Makefile.macppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.macppc,v 1.103 2021/11/27 00:49:21 jsg Exp $ +# $OpenBSD: Makefile.macppc,v 1.104 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -44,7 +44,8 @@ COPTIMIZE?= -Oz .endif .if ${COMPILER_VERSION:Mclang} NO_INTEGR_AS= -no-integrated-as -CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant .endif DEBUG?= -g diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index f4c6d2190e1..18833f63adb 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.59 2021/11/27 00:49:22 jsg Exp $ +# $OpenBSD: Makefile.octeon,v 1.60 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -47,7 +47,8 @@ COPTIMIZE?= -Oz .if ${COMPILER_VERSION:Mclang} NO_INTEGR_AS= -no-integrated-as CMACHFLAGS+= -fomit-frame-pointer -CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant .endif DEBUG?= -g diff --git a/sys/arch/powerpc64/conf/Makefile.powerpc64 b/sys/arch/powerpc64/conf/Makefile.powerpc64 index a58ec382177..af763b3c878 100644 --- a/sys/arch/powerpc64/conf/Makefile.powerpc64 +++ b/sys/arch/powerpc64/conf/Makefile.powerpc64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.powerpc64,v 1.11 2021/11/27 00:49:22 jsg Exp $ +# $OpenBSD: Makefile.powerpc64,v 1.12 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -48,6 +48,7 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-pointer-sign \ -Wno-constant-conversion -Wno-address-of-packed-member \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant \ -Wframe-larger-than=2047 CMACHFLAGS= -mabi=elfv2 -msoft-float -mno-altivec -mno-vsx diff --git a/sys/arch/riscv64/conf/Makefile.riscv64 b/sys/arch/riscv64/conf/Makefile.riscv64 index 5c9b5e07ecb..0972911c51e 100644 --- a/sys/arch/riscv64/conf/Makefile.riscv64 +++ b/sys/arch/riscv64/conf/Makefile.riscv64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.riscv64,v 1.13 2021/11/27 00:49:22 jsg Exp $ +# $OpenBSD: Makefile.riscv64,v 1.14 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -28,6 +28,7 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-pointer-sign \ -Wno-constant-conversion -Wno-address-of-packed-member \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant \ -Wframe-larger-than=2047 CMACHFLAGS= -march=rv64gc -mcmodel=medany -mno-relax \ diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 7f2fdaca0c1..90913acf125 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc64,v 1.103 2021/01/28 17:39:03 deraadt Exp $ +# $OpenBSD: Makefile.sparc64,v 1.104 2021/12/17 14:59:22 patrick Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -45,7 +45,8 @@ COPTIMIZE?= -Oz .endif .if ${COMPILER_VERSION:Mclang} CWARNFLAGS+= -Wno-unused-command-line-argument -CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion \ + -Wno-unused-but-set-variable -Wno-gnu-folding-constant .endif DEBUG?= -g -- 2.20.1