Re: [PATCH v4 10/30] perf build: Append extra host flags
From: Namhyung Kim
Date: Thu Mar 12 2026 - 14:32:07 EST
On Wed, Mar 11, 2026 at 08:29:35AM +0000, Leo Yan wrote:
> Append HOST_EXTRACFLAGS to HOST_CFLAGS so that additional flags can be
> applied to the host compiler.
>
> Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Thanks,
Namhyung
> ---
> 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 a8dc72cfe48eec52bd9e2352c46c88f5d8047765..f4004ec148a19c784bfe3ee9b5cc3901a3db25a3 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
>