Saturday, January 01, 2022

Re: fix misc/posixtestsuite

On Sat, Jan 01 2022, Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
> On Fri, Dec 31 2021, Stefan Hagen <sh+openbsd-ports@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...

> CC += $MAINTAINER
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/misc/posixtestsuite/Makefile,v
> retrieving revision 1.6
> diff -u -p -r1.6 Makefile
> --- Makefile 12 Jul 2019 20:47:53 -0000 1.6
> +++ Makefile 1 Jan 2022 09:31:58 -0000
> @@ -166,3 +166,7 @@ do-install:
> ${PREFIX}/bin/posixtestsuite-html
>
> .include <bsd.port.mk>
> +
> +.if ${CHOSEN_COMPILER:Mbase-clang}
> +CFLAGS += -Wno-error=unused-but-set-variable
> +.endif

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

No comments:

Post a Comment