]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpftool: Append extra host flags
authorLeo Yan <leo.yan@arm.com>
Tue, 2 Jun 2026 14:47:12 +0000 (15:47 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 Jun 2026 00:32:53 +0000 (17:32 -0700)
Append HOST_EXTRACFLAGS to HOST_CFLAGS so that additional flags can be
applied to the host compiler.

Acked-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Link: https://lore.kernel.org/r/20260602-tools_build_fix_zero_init_bpf_only-v2-3-c76e5250ea1c@arm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/Makefile

index 49bae0359144f7fd736c3040da682bc38d9ff1d1..271a7dc7727309b61a845ce61270d8c551596060 100644 (file)
@@ -87,6 +87,7 @@ endif
 # including flags that are not applicable to the host compiler.
 HOST_CFLAGS := $(subst -I$(LIBBPF_INCLUDE),-I$(LIBBPF_BOOTSTRAP_INCLUDE),\
                $(subst $(CLANG_CROSS_FLAGS),,$(CFLAGS)))
+HOST_CFLAGS += $(HOST_EXTRACFLAGS)
 
 ifneq ($(EXTRA_CFLAGS),)
 CFLAGS += $(EXTRA_CFLAGS)