On Tue, Jan 11, 2022 at 07:25:58PM +0100, Jeremie Courreges-Anglas wrote: > On Mon, Jan 10 2022, Alexander Bluhm <alexander.bl...@gmx.net> wrote: > > On Mon, Jan 10, 2022 at 10:55:54PM +0100, Jeremie Courreges-Anglas wrote: > >> On Mon, Jan 10 2022, Alexander Bluhm <alexander.bl...@gmx.net> wrote: > >> > On Sat, Jan 01, 2022 at 10:52:37AM +0100, Jeremie Courreges-Anglas wrote: > >> >> On Sat, Jan 01 2022, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: > >> >> > On Fri, Dec 31 2021, Stefan Hagen <sh+openbsd-po...@codevoid.de> > >> >> > wrote: > >> >> >> Christian Weisgerber wrote: > >> >> >>> Here's a reminder that these ports still fail to build since the > >> >> >>> LLVM 13 update: > >> >> >>> > >> >> >>> devel/qbs > >> >> >>> lang/libv8 > >> >> >>> misc/posixtestsuite > >> >> >> > >> >> >> Here -Werror is set and some variables now throw an -Wunused-but-set > >> >> >> error. > >> >> >> This happens frequently in this testsuite. > >> >> >> > >> >> >> Shall we switch it off? > >> >> > > >> >> > This is a clang-only flag, you can't use it with base-gcc. Here's a > >> >> > way > >> >> > to handle this. > >> >> > >> >> That would work if CFLAGS was respected, but it isn't... > >> > > >> > Who needs this -Werror anyway? Without it, it manages to compile > >> > more tests. > >> > > >> > ok? > >> > >> Yep. > >> > >> But still it would be better to address the "does not respect CFLAGS" part. > >> Can be done in a subsequent commit. > > > > Seems to work as my patch contains a CFLAGS += > > The devil is in the details. With CFLAGS += -O2 -g in the Makefile, > it's not possible to override those on the command line, eg > > make clean repackage reinstall DEBUG='-g -O0' > > If upstream's Makefile doesn't provide any easy way you can just use > more patching, for example the diff below. > > ok?
OK bluhm@ > PS: I think (but I didn't check) that patch-Makefile contains hunks that > are not strictly needed now that you removed -Werror. You may or may > not want to revert them. > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/misc/posixtestsuite/Makefile,v > retrieving revision 1.7 > diff -u -p -r1.7 Makefile > --- Makefile 10 Jan 2022 22:10:15 -0000 1.7 > +++ Makefile 11 Jan 2022 18:03:43 -0000 > @@ -3,7 +3,7 @@ > COMMENT = open POSIX test suite > > DISTNAME = posixtestsuite-1.5.2 > -REVISION = 4 > +REVISION = 5 > > CATEGORIES = misc > > @@ -21,6 +21,7 @@ MASTER_SITES = ${MASTER_SITE_SOURCEFORG > BUILD_DEPENDS = textproc/gsed > > USE_GMAKE = Yes > +MAKE_FLAGS = PORTS_CFLAGS="${CFLAGS}" > > WRKDIST = ${WRKDIR}/posixtestsuite > > Index: patches/patch-Makefile > =================================================================== > RCS file: /cvs/ports/misc/posixtestsuite/patches/patch-Makefile,v > retrieving revision 1.3 > diff -u -p -r1.3 patch-Makefile > --- patches/patch-Makefile 10 Jan 2022 22:10:15 -0000 1.3 > +++ patches/patch-Makefile 11 Jan 2022 18:03:43 -0000 > @@ -22,7 +22,7 @@ Index: Makefile > $(MAKE) all | column -t -s: > > -CFLAGS = -g -O2 -Wall -Werror -D_POSIX_C_SOURCE=200112L > -+CFLAGS += -g -O2 -Wall -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 > ++CFLAGS = -Wall -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 ${PORTS_CFLAGS} > > # add -std=c99, -std=gnu99 if compiler supports it (gcc-2.95.3 does not). > check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null > 2>&1; then echo "$(1)"; else echo "$(2)"; fi) > > > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE