[PATCH bpf-next v2 3/8] bpftool: Append extra host flags
From: Leo Yan
Date: Tue Jun 02 2026 - 10:55:46 EST
Append HOST_EXTRACFLAGS to HOST_CFLAGS so that additional flags can be
applied to the host compiler.
Acked-by: Quentin Monnet <qmo@xxxxxxxxxx>
Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
---
tools/bpf/bpftool/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 616c14247e4bb690e16ae4ff8c1992e6d4fc863e..96be5647f0e1370247025d65e813db376b146e52 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -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)
--
2.34.1