aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2023-07-27 23:49:14 -0700
committerArnaldo Carvalho de Melo <[email protected]>2023-07-28 19:01:17 -0300
commite5764ae4c9714e58fa3c38a7e4900d4379dc2263 (patch)
tree459144a480b91af3ff298158079fd3ea497daab9
parent435bea0a45cb309772b22c56b2d570f743f655e0 (diff)
perf build: Add Wextra for C++ compilation
Commit d58ac0bf8d1e ("perf build: Add clang and llvm compile and linking support") added -Wall and -Wno-strict-aliasing for CXXFLAGS, but not -Wextra. -Wno-strict-aliasing is no longer necessary, adding -Wextra for CXXFLAGS requires adding -Wno-unused-parameter clang.cpp and clang-test.cpp for LIBCLANGLLVM=1 to build. Signed-off-by: Ian Rogers <[email protected]> Acked-by: James Clark <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Eduard Zingerman <[email protected]> Cc: Gaosheng Cui <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rob Herring <[email protected]> Cc: Tom Rix <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/Makefile.config2
-rw-r--r--tools/perf/util/c++/Build3
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 14709a6bd622..fe7afe6d8529 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -333,8 +333,8 @@ CORE_CFLAGS += -std=gnu11
CXXFLAGS += -std=gnu++14 -fno-exceptions -fno-rtti
CXXFLAGS += -Wall
+CXXFLAGS += -Wextra
CXXFLAGS += -fno-omit-frame-pointer
-CXXFLAGS += -Wno-strict-aliasing
HOSTCFLAGS += -Wall
HOSTCFLAGS += -Wextra
diff --git a/tools/perf/util/c++/Build b/tools/perf/util/c++/Build
index 613ecfd76527..8610d032ac19 100644
--- a/tools/perf/util/c++/Build
+++ b/tools/perf/util/c++/Build
@@ -1,2 +1,5 @@
perf-$(CONFIG_CLANGLLVM) += clang.o
perf-$(CONFIG_CLANGLLVM) += clang-test.o
+
+CXXFLAGS_clang.o += -Wno-unused-parameter
+CXXFLAGS_clang-test.o += -Wno-unused-parameter