Actually hide the clang-15 workaround behind the COMPILER_VERSION check
authorjca <jca@openbsd.org>
Fri, 30 Dec 2022 06:50:27 +0000 (06:50 +0000)
committerjca <jca@openbsd.org>
Fri, 30 Dec 2022 06:50:27 +0000 (06:50 +0000)
COMPILER_VERSION initially missed.  I'm not sure why we still have those
COMPILER_VERSION checks in sys/arch/i386 and sys/arch/amd64, when the
base system doesn't ship gcc any more, but let's stay consistent.

sys/arch/amd64/stand/Makefile.inc
sys/arch/i386/stand/Makefile.inc

index e022e19..e3590af 100644 (file)
@@ -1,9 +1,6 @@
-#      $OpenBSD: Makefile.inc,v 1.19 2022/12/30 06:44:35 jca Exp $
+#      $OpenBSD: Makefile.inc,v 1.20 2022/12/30 06:50:27 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
@@ -28,6 +25,9 @@ SACFLAGS+=-nostdinc -fno-builtin -fpack-struct
 
 .include <bsd.own.mk>
 .if ${COMPILER_VERSION:Mclang}
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CFLAGS+=       -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 NO_INTEGR_AS=  -no-integrated-as
 .endif
 
index 3c58a9c..df73ce1 100644 (file)
@@ -1,10 +1,7 @@
-#      $OpenBSD: Makefile.inc,v 1.52 2022/12/30 06:44:35 jca Exp $
+#      $OpenBSD: Makefile.inc,v 1.53 2022/12/30 06:50:27 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=
@@ -28,6 +25,9 @@ SACFLAGS+=-nostdinc -fno-builtin -fpack-struct
 
 .include <bsd.own.mk>
 .if ${COMPILER_VERSION:Mclang}
+# XXX Workaround for zlib + clang 15
+# https://github.com/madler/zlib/issues/633
+CFLAGS+=       -Wno-deprecated-non-prototype -Wno-unknown-warning-option
 NO_INTEGR_AS=   -no-integrated-as
 .endif