From 15fb80af7daa7f7974ccd9f67734d29d2b0330c5 Mon Sep 17 00:00:00 2001 From: jca Date: Fri, 30 Dec 2022 06:50:27 +0000 Subject: [PATCH] Actually hide the clang-15 workaround behind the COMPILER_VERSION check 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 | 8 ++++---- sys/arch/i386/stand/Makefile.inc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/arch/amd64/stand/Makefile.inc b/sys/arch/amd64/stand/Makefile.inc index e022e19942b..e3590aff50c 100644 --- a/sys/arch/amd64/stand/Makefile.inc +++ b/sys/arch/amd64/stand/Makefile.inc @@ -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 .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 diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc index 3c58a9c1a3e..df73ce17abf 100644 --- a/sys/arch/i386/stand/Makefile.inc +++ b/sys/arch/i386/stand/Makefile.inc @@ -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 .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 -- 2.20.1