On Tue, May 28, 2024 at 01:28:33PM -0700, Nathan Chancellor wrote:..
diff --git a/tools/testing/selftests/user_events/Makefile b/tools/testing/selftests/user_events/Makefile
index 10fcd0066203..617e94344711 100644
--- a/tools/testing/selftests/user_events/Makefile
+++ b/tools/testing/selftests/user_events/Makefile
@@ -1,5 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
+
+ifneq ($(LLVM),)
Perhaps it would be better if this were
ifeq ($(CC),clang)
as that would catch both CC=clang and LLVM=1 users? I haven't tested
this though.
Hmmm, now that I am actually looking at tools/testing/selftests/lib.mk,
it seems like CC is only set to clang when $(LLVM) is set, so keeping it
the way it is now is probably best. Sorry about that, I am not too
familiar with the tools build system.
Additionally, I think it would be good to mention that
-Wno-address-of-packed-member is GCC's default, whereas Clang enables
-Waddress-of-packed-member by default.
+ CFLAGS += -Wno-address-of-packed-member
+endif
+
LDLIBS += -lrt -lpthread -lm
TEST_GEN_PROGS = ftrace_test dyn_test perf_test abi_test
base-commit: 2bfcfd584ff5ccc8bb7acde19b42570414bf880b
--
2.45.1