[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251204094054.01c15d1e@kernel.org>
Date: Thu, 4 Dec 2025 09:40:54 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Shuah Khan <shuah@...nel.org>, Christian Brauner <brauner@...nel.org>,
Elizabeth Figura <zfigura@...eweavers.com>, Thomas Gleixner
<tglx@...utronix.de>, Eric Dumazet <edumazet@...gle.com>, Kees Cook
<kees@...nel.org>, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, wine-devel@...ehq.org,
netdev@...r.kernel.org, bpf@...r.kernel.org, Kuniyuki Iwashima
<kuniyu@...gle.com>
Subject: Re: [PATCH 06/13] selftest: af_unix: Support compilers without
flex-array-member-not-at-end support
On Thu, 4 Dec 2025 08:17:20 -0800 Guenter Roeck wrote:
> -CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end
> +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end)
Hm, the Claude code review we have hooked up to patchwork says:
Is cc-option available in the selftest build environment? Looking at
tools/testing/selftests/lib.mk (included at line 14), it doesn't include
scripts/Makefile.compiler where cc-option is defined. When cc-option is
undefined, $(call cc-option,...) expands to an empty string, which means
the -Wflex-array-member-not-at-end flag won't be added even on compilers
that support it.
This defeats the purpose of commit 1838731f1072c which added the warning
flag to catch flexible array issues.
For comparison, tools/testing/selftests/nolibc/Makefile explicitly
includes scripts/Makefile.compiler before using cc-option.
Testing it:
$ make -C tools/testing/selftests/ TARGETS=net/af_unix Q= V=1
make: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests'
make[1]: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests/net/af_unix'
gcc -isystem /home/kicinski/devel/linux/usr/include -Wall -D_GNU_SOURCE= diag_uid.c -o /home/kicinski/devel/linux/tools/testing/selftests/net/af_unix/diag_uid
looks like the flag just disappears. Even tho:
gcc version 15.2.1
Powered by blists - more mailing lists