From fc532a6e4f7ee2431443428250620cbc432d7fbb Mon Sep 17 00:00:00 2001 From: jca Date: Wed, 6 Sep 2023 11:49:11 +0000 Subject: [PATCH] Build with -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. This fixes the build of libiberty and texinfo with clang-16. ok robert@ --- gnu/lib/libiberty/Makefile.bsd-wrapper | 3 ++- gnu/usr.bin/texinfo/Makefile.bsd-wrapper | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/lib/libiberty/Makefile.bsd-wrapper b/gnu/lib/libiberty/Makefile.bsd-wrapper index 3c9eb8c6a31..93399b32781 100644 --- a/gnu/lib/libiberty/Makefile.bsd-wrapper +++ b/gnu/lib/libiberty/Makefile.bsd-wrapper @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.19 2018/09/14 13:37:52 naddy Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.20 2023/09/06 11:49:11 jca Exp $ LIB= iberty CPPFLAGS+= -DHAVE_CONFIG_H -I$(.CURDIR)/src -I$(.CURDIR)/include -I$(.OBJDIR) +CFLAGS+= -std=gnu89 XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}" HOST_FILES!= cat $(.OBJDIR)/needed-list 2>/dev/null||true diff --git a/gnu/usr.bin/texinfo/Makefile.bsd-wrapper b/gnu/usr.bin/texinfo/Makefile.bsd-wrapper index 11158c4b0d0..d9d6ad72394 100644 --- a/gnu/usr.bin/texinfo/Makefile.bsd-wrapper +++ b/gnu/usr.bin/texinfo/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.47 2019/12/21 21:40:00 espie Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.48 2023/09/06 11:49:11 jca Exp $ INFODIR= infodir=/usr/share/info INFOPATH= DEFAULT_INFOPATH=/usr/local/info:/usr/share/info:. @@ -6,6 +6,7 @@ INFOPATH= DEFAULT_INFOPATH=/usr/local/info:/usr/share/info:. MAN= doc/info.1 doc/install-info.1 doc/makeinfo.1 doc/texi2dvi.1 MAN+= doc/texindex.1 doc/info.5 doc/texinfo.5 doc/infokey.1 +CFLAGS+= -std=gnu89 XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}" GNUCFLAGS= ${XCFLAGS} \ ACLOCAL=true AUTOHEADER=true AUTOCONF=true AUTOMAKE=true \ -- 2.20.1