[PATCH v7 07/23] perf build: Append extra host flags

From: Leo Yan

Date: Tue Jun 02 2026 - 10:53:12 EST


Append HOST_EXTRACFLAGS to HOST_CFLAGS so that additional flags can be
applied to the host compiler.

Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
---
tools/perf/Makefile.config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 333ddd0e4bd814e9b935e9f706e640baccf49b7e..17c27b876551922a537dc0e1000d396c43ff9e12 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -17,7 +17,7 @@ detected = $(shell echo "$(1)=y" >> $(OUTPUT).config-detected)
detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)

CFLAGS := $(EXTRA_CFLAGS) $(filter-out -Wnested-externs,$(EXTRA_WARNINGS))
-HOSTCFLAGS := $(filter-out -Wnested-externs,$(EXTRA_WARNINGS))
+HOSTCFLAGS := $(HOST_EXTRACFLAGS) $(filter-out -Wnested-externs,$(EXTRA_WARNINGS))

# This is required because the kernel is built with this and some of the code
# borrowed from kernel headers depends on it, e.g. put_unaligned_*().

--
2.34.1