diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2025-12-05 09:10:00 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-02 12:56:46 +0100 |
| commit | 008fd87cd7082ba3bd9db7df275ffdabab647524 (patch) | |
| tree | ef5cc28276696d2f4e40b8803201adcf4d64cca1 /tools | |
| parent | 1d18e7155f64d283561fd97d474b966de8444812 (diff) | |
| download | linux-008fd87cd7082ba3bd9db7df275ffdabab647524.tar.gz linux-008fd87cd7082ba3bd9db7df275ffdabab647524.tar.bz2 linux-008fd87cd7082ba3bd9db7df275ffdabab647524.zip | |
selftest: af_unix: Support compilers without flex-array-member-not-at-end support
[ Upstream commit 06f7cae92fe346fa49a8a9b161124b26cc5c3ed1 ]
Fix:
gcc: error: unrecognized command-line option ‘-Wflex-array-member-not-at-end’
by making the compiler option dependent on its support.
Fixes: 1838731f1072c ("selftest: af_unix: Add -Wall and -Wflex-array-member-not-at-end to CFLAGS.")
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://patch.msgid.link/20251205171010.515236-7-linux@roeck-us.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/net/af_unix/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/af_unix/Makefile b/tools/testing/selftests/net/af_unix/Makefile index 528d14c598bb..2889403e3546 100644 --- a/tools/testing/selftests/net/af_unix/Makefile +++ b/tools/testing/selftests/net/af_unix/Makefile @@ -1,4 +1,9 @@ -CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end +top_srcdir := ../../../../.. +include $(top_srcdir)/scripts/Makefile.compiler + +cc-option = $(call __cc-option, $(CC),,$(1),$(2)) + +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end) TEST_GEN_PROGS := \ diag_uid \ |
