From: jca Date: Wed, 6 Sep 2023 12:15:30 +0000 (+0000) Subject: Use -std=gnu89 to fix the build with clang-16 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4dce7c7aafdce7a2060aea138b9d26389ee7f96e;p=openbsd Use -std=gnu89 to fix the build with clang-16 This is ancient GNU software that tends to break whenever clang adds more warnings about deprecated features in new languages versions or turns them into errors. Using -std=gnu89 (the defaults for base-gcc) for those packages means we'll probably avoid most new warnings, errors, and possible miscompilations when updating clang. ok robert@ --- diff --git a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper index b2150cb063c..223483c63f9 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.31 2023/01/27 22:01:02 kettenis Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.32 2023/09/06 12:15:30 jca Exp $ .include @@ -7,6 +7,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} SUBDIRS= opcodes bfd CONF_SUBDIRS= opcodes bfd +CFLAGS+= -std=gnu89 CFLAGS+= ${PIE_DEFAULT} XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDSTATIC}" # This allows moving the whole binutils installation around for diff --git a/gnu/usr.bin/binutils/Makefile.bsd-wrapper b/gnu/usr.bin/binutils/Makefile.bsd-wrapper index a78e1ae914a..ec5b92789ec 100644 --- a/gnu/usr.bin/binutils/Makefile.bsd-wrapper +++ b/gnu/usr.bin/binutils/Makefile.bsd-wrapper @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.89 2019/12/21 21:40:00 espie Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.90 2023/09/06 12:15:30 jca Exp $ .include +CFLAGS+= -std=gnu89 CFLAGS+= ${PIE_DEFAULT} XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDSTATIC}" # This allows moving the whole binutils installation around for diff --git a/gnu/usr.bin/cvs/Makefile.bsd-wrapper b/gnu/usr.bin/cvs/Makefile.bsd-wrapper index ee2e7720468..0a58a6cf9d3 100644 --- a/gnu/usr.bin/cvs/Makefile.bsd-wrapper +++ b/gnu/usr.bin/cvs/Makefile.bsd-wrapper @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.59 2019/12/21 21:40:00 espie Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.60 2023/09/06 12:15:30 jca Exp $ .include MAN= man/cvs.1 man/cvs.5 man/cvsbug.8 man/rcs2log.1 +CFLAGS+= -std=gnu89 XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" CPP="${CPP}" CLEANFILES= src/version.c lib/getdate.c lib/getdate.h macintosh/Makefile \ os2/Makefile zlib/Makefile \