[PATCH v3 29/30] selftests/nolibc: Append extra cflags
From: Leo Yan
Date: Sun Mar 08 2026 - 12:59:09 EST
Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
the compiler.
Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
---
tools/testing/selftests/nolibc/Makefile.nolibc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc
index f5704193038f7da935d57e0f894970b6e29b78da..e58b2f5eb2b231bb1c194db7365fff7b4e244e5d 100644
--- a/tools/testing/selftests/nolibc/Makefile.nolibc
+++ b/tools/testing/selftests/nolibc/Makefile.nolibc
@@ -252,6 +252,9 @@ endif
# Modify CFLAGS based on LLVM=
include $(srctree)/tools/scripts/Makefile.include
+# Append EXTRA_CFLAGS if it is set in tools/scripts/Makefile.include
+CFLAGS += $(EXTRA_CFLAGS)
+
REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \
/^Total number of errors:/{done++} \
END{ printf("\n%3d test(s): %3d passed, %3d skipped, %3d failed => status: ", p+s+f, p, s, f); \
--
2.34.1