[PATCH 6.6 039/201] tools build: Align warning options with perf

Greg Kroah-Hartman gregkh at linuxfoundation.org
Fri Oct 17 07:51:40 PDT 2025


6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Leo Yan <leo.yan at arm.com>

[ Upstream commit 53d067feb8c4f16d1f24ce3f4df4450bb18c555f ]

The feature test programs are built without enabling '-Wall -Werror'
options. As a result, a feature may appear to be available, but later
building in perf can fail with stricter checks.

Make the feature test program use the same warning options as perf.

Fixes: 1925459b4d92 ("tools build: Fix feature Makefile issues with 'O='")
Signed-off-by: Leo Yan <leo.yan at arm.com>
Reviewed-by: Ian Rogers <irogers at google.com>
Link: https://lore.kernel.org/r/20251006-perf_build_android_ndk-v3-1-4305590795b2@arm.com
Cc: Palmer Dabbelt <palmer at dabbelt.com>
Cc: Albert Ou <aou at eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex at ghiti.fr>
Cc: Nick Desaulniers <nick.desaulniers+lkml at gmail.com>
Cc: Justin Stitt <justinstitt at google.com>
Cc: Bill Wendling <morbo at google.com>
Cc: Adrian Hunter <adrian.hunter at intel.com>
Cc: Arnaldo Carvalho de Melo <acme at kernel.org>
Cc: Jiri Olsa <jolsa at kernel.org>
Cc: Namhyung Kim <namhyung at kernel.org>
Cc: Nathan Chancellor <nathan at kernel.org>
Cc: James Clark <james.clark at linaro.org>
Cc: linux-riscv at lists.infradead.org
Cc: llvm at lists.linux.dev
Cc: Paul Walmsley <paul.walmsley at sifive.com>
Cc: linux-kernel at vger.kernel.org
Cc: linux-perf-users at vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme at redhat.com>
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
 tools/build/feature/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 4f869fff28fe4..17e03236e3461 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -306,10 +306,10 @@ $(OUTPUT)test-libbabeltrace.bin:
 	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
 
 $(OUTPUT)test-compile-32.bin:
-	$(CC) -m32 -o $@ test-compile.c
+	$(CC) -m32 -Wall -Werror -o $@ test-compile.c
 
 $(OUTPUT)test-compile-x32.bin:
-	$(CC) -mx32 -o $@ test-compile.c
+	$(CC) -mx32 -Wall -Werror -o $@ test-compile.c
 
 $(OUTPUT)test-zlib.bin:
 	$(BUILD) -lz
-- 
2.51.0






More information about the linux-riscv mailing list