Neuter zlib fatal warnings when building kernels and bootloaders with clang 15
authorjca <jca@openbsd.org>
Fri, 30 Dec 2022 06:44:35 +0000 (06:44 +0000)
committerjca <jca@openbsd.org>
Fri, 30 Dec 2022 06:44:35 +0000 (06:44 +0000)
Disable -Wdeprecated-non-prototype instead of patching zlib.  Upstream
plans to drop the pre-ANSI syntax soon.  ok tb@ millert@

15 files changed:
sys/arch/amd64/conf/Makefile.amd64
sys/arch/amd64/stand/Makefile.inc
sys/arch/arm64/conf/Makefile.arm64
sys/arch/arm64/stand/efiboot/Makefile
sys/arch/armv7/conf/Makefile.armv7
sys/arch/armv7/stand/efiboot/Makefile
sys/arch/i386/conf/Makefile.i386
sys/arch/i386/stand/Makefile.inc
sys/arch/loongson/conf/Makefile.loongson
sys/arch/macppc/conf/Makefile.macppc
sys/arch/octeon/conf/Makefile.octeon
sys/arch/powerpc64/conf/Makefile.powerpc64
sys/arch/riscv64/conf/Makefile.riscv64
sys/arch/riscv64/stand/efiboot/Makefile
sys/arch/sparc64/conf/Makefile.sparc64

index d270442..9e82ed3 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.amd64,v 1.127 2022/04/07 07:30:54 jsg Exp $
+#      $OpenBSD: Makefile.amd64,v 1.128 2022/12/30 06:44:35 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -72,6 +72,9 @@ CMACHFLAGS+=  -mno-retpoline
 NO_INTEGR_AS=  -no-integrated-as
 CWARNFLAGS+=   -Wno-address-of-packed-member -Wno-constant-conversion \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 .endif
 
 DEBUG?=                -g
index 7e45fed..e022e19 100644 (file)
@@ -1,6 +1,9 @@
-#      $OpenBSD: Makefile.inc,v 1.18 2017/07/25 13:32:14 robert Exp $
+#      $OpenBSD: Makefile.inc,v 1.19 2022/12/30 06:44:35 jca Exp $
 
 CFLAGS=${DEBUG} ${COPTS} -Oz -Wall -Werror
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CFLAGS+=       -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 CFLAGS+=       -ffreestanding -fno-stack-protector -DMDRANDOM
 CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR}
 SACFLAGS=-D_STANDALONE
index 47227b8..2970ceb 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.arm64,v 1.42 2022/01/14 06:53:16 jsg Exp $
+#      $OpenBSD: Makefile.arm64,v 1.43 2022/12/30 06:44:35 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -51,6 +51,9 @@ CWARNFLAGS=   -Werror -Wall -Wimplicit-function-declaration \
                -Wno-constant-conversion -Wno-address-of-packed-member \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant \
                -Wframe-larger-than=2047
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 CMACHFLAGS=    -march=armv8-a+nofp+nosimd \
                -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer \
index 6cbb987..9c41afa 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.17 2022/12/07 23:04:26 patrick Exp $
+#      $OpenBSD: Makefile,v 1.18 2022/12/30 06:44:35 jca Exp $
 
 NOMAN=         #
 
@@ -53,6 +53,9 @@ COPTS+=               -Wno-attributes -Wno-format
 COPTS+=                -ffreestanding -fno-stack-protector
 COPTS+=                -fshort-wchar -fPIC -fno-builtin
 COPTS+=                -Wall -Werror
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+COPTS+=                -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 PROG.elf=      ${PROG:S/.EFI/.elf/}
 CLEANFILES+=   ${PROG.elf} ${PROG.elf}.tmp
index d8fc771..78944a7 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.armv7,v 1.52 2021/12/17 14:59:22 patrick Exp $
+#      $OpenBSD: Makefile.armv7,v 1.53 2022/12/30 06:44:35 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -28,6 +28,9 @@ CWARNFLAGS=   -Werror -Wall -Wimplicit-function-declaration \
                -Wno-constant-conversion -Wno-address-of-packed-member \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant \
                -Wframe-larger-than=2047
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 CMACHFLAGS=    -msoft-float -march=armv7a
 CMACHFLAGS+=   -ffreestanding ${NOPIE_FLAGS}
index d6ffc41..0fe490f 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.17 2021/11/14 21:51:48 guenther Exp $
+#      $OpenBSD: Makefile,v 1.18 2022/12/30 06:44:35 jca Exp $
 
 NOMAN=         #
 
@@ -51,6 +51,9 @@ COPTS+=               -ffreestanding -fno-stack-protector
 COPTS+=                -fshort-wchar -fPIC -fno-builtin
 COPTS+=                -Wall -Werror
 COPTS+=                -mfloat-abi=soft
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+COPTS+=                -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 PROG.elf=      ${PROG:S/.EFI/.elf/}
 CLEANFILES+=   ${PROG.elf} ${PROG.elf}.tmp
index 4dbf184..77b2bb5 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.i386,v 1.142 2021/12/17 14:59:22 patrick Exp $
+#      $OpenBSD: Makefile.i386,v 1.143 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -46,6 +46,9 @@ CMACHFLAGS+=  -mretpoline
 NO_INTEGR_AS=  -no-integrated-as
 CWARNFLAGS+=   -Wno-address-of-packed-member -Wno-constant-conversion \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 .endif
 
 DEBUG?=                -g
index cd14f5b..3c58a9c 100644 (file)
@@ -1,7 +1,10 @@
-#      $OpenBSD: Makefile.inc,v 1.51 2017/07/25 13:32:14 robert Exp $
+#      $OpenBSD: Makefile.inc,v 1.52 2022/12/30 06:44:35 jca Exp $
 
 CFLAGS=${DEBUG} ${COPTS} -Oz -Wall -Werror
 CFLAGS+=       -ffreestanding -fno-stack-protector -DMDRANDOM
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CFLAGS+=       -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR}
 SACFLAGS=-D_STANDALONE
 DEBUGFLAGS=
index c34f616..0434766 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.loongson,v 1.82 2021/12/17 14:59:22 patrick Exp $
+#      $OpenBSD: Makefile.loongson,v 1.83 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -51,6 +51,9 @@ NO_INTEGR_AS= -no-integrated-as
 CMACHFLAGS+=   -fomit-frame-pointer
 CWARNFLAGS+=   -Wno-address-of-packed-member -Wno-constant-conversion \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 .endif
 
 DEBUG?=                -g
index bd233e2..597f4a9 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.macppc,v 1.104 2021/12/17 14:59:22 patrick Exp $
+#      $OpenBSD: Makefile.macppc,v 1.105 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -46,6 +46,9 @@ COPTIMIZE?=   -Oz
 NO_INTEGR_AS=  -no-integrated-as
 CWARNFLAGS+=   -Wno-address-of-packed-member -Wno-constant-conversion \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 .endif
 
 DEBUG?=                -g
index 2af1422..e43afc0 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.octeon,v 1.61 2022/07/18 12:48:35 visa Exp $
+#      $OpenBSD: Makefile.octeon,v 1.62 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -49,6 +49,9 @@ NO_INTEGR_AS= -no-integrated-as
 CMACHFLAGS+=   -fomit-frame-pointer
 CWARNFLAGS+=   -Wno-address-of-packed-member -Wno-constant-conversion \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 .endif
 
 DEBUG?=                -g
index 8e1d768..79bac67 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.powerpc64,v 1.13 2022/01/14 06:53:17 jsg Exp $
+#      $OpenBSD: Makefile.powerpc64,v 1.14 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -51,6 +51,9 @@ CWARNFLAGS=   -Werror -Wall -Wimplicit-function-declaration \
                -Wno-constant-conversion -Wno-address-of-packed-member \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant \
                -Wframe-larger-than=2047
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 CMACHFLAGS=    -mabi=elfv2 -msoft-float -mno-altivec -mno-vsx
 CMACHFLAGS+=   -ffreestanding
index 3f3336d..5534eef 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.riscv64,v 1.15 2022/01/12 00:58:48 kevlo Exp $
+#      $OpenBSD: Makefile.riscv64,v 1.16 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -30,6 +30,9 @@ CWARNFLAGS=   -Werror -Wall -Wimplicit-function-declaration \
                -Wno-constant-conversion -Wno-address-of-packed-member \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant \
                -Wframe-larger-than=2047
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 CMACHFLAGS=    -march=rv64gc -mcmodel=medany -mno-relax \
                -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
index a9906d5..85b3f9c 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.2 2021/11/14 21:51:48 guenther Exp $
+#      $OpenBSD: Makefile,v 1.3 2022/12/30 06:44:35 jca Exp $
 
 NOMAN=         #
 
@@ -54,6 +54,9 @@ COPTS+=               -Wno-attributes -Wno-format
 COPTS+=                -ffreestanding -fno-stack-protector
 COPTS+=                -fshort-wchar -fPIC -fno-builtin
 COPTS+=                -Wall -Werror
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+COPTS+=                -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 
 PROG.elf=      ${PROG:S/.EFI/.elf/}
 CLEANFILES+=   ${PROG.elf} ${PROG.elf}.tmp
index 90913ac..ade1835 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.sparc64,v 1.104 2021/12/17 14:59:22 patrick Exp $
+#      $OpenBSD: Makefile.sparc64,v 1.105 2022/12/30 06:44:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -47,6 +47,9 @@ COPTIMIZE?=   -Oz
 CWARNFLAGS+=   -Wno-unused-command-line-argument
 CWARNFLAGS+=   -Wno-address-of-packed-member -Wno-constant-conversion \
                -Wno-unused-but-set-variable -Wno-gnu-folding-constant
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CWARNFLAGS+=   -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 .endif
 
 DEBUG?=                -g