Skip to content

Commit 215dda2

Browse files
jpbruckerkernel-patches-bot
authored andcommitted
tools/bpftool: Fix build slowdown
Commit ba2fd56 ("tools/bpftool: Support passing BPFTOOL_VERSION to make") changed BPFTOOL_VERSION to a recursively expanded variable, forcing it to be recomputed on every expansion of CFLAGS and dramatically slowing down the bpftool build. Restore BPFTOOL_VERSION as a simply expanded variable, guarded by an ifeq(). Fixes: ba2fd56 ("tools/bpftool: Support passing BPFTOOL_VERSION to make") Signed-off-by: Jean-Philippe Brucker <[email protected]>
1 parent ae00f90 commit 215dda2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/bpf/bpftool/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ LIBBPF = $(LIBBPF_PATH)libbpf.a
3030
LIBBPF_BOOTSTRAP_OUTPUT = $(BOOTSTRAP_OUTPUT)libbpf/
3131
LIBBPF_BOOTSTRAP = $(LIBBPF_BOOTSTRAP_OUTPUT)libbpf.a
3232

33-
BPFTOOL_VERSION ?= $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
33+
ifeq ($(BPFTOOL_VERSION),)
34+
BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
35+
endif
3436

3537
$(LIBBPF_OUTPUT) $(BOOTSTRAP_OUTPUT) $(LIBBPF_BOOTSTRAP_OUTPUT):
3638
$(QUIET_MKDIR)mkdir -p $@

0 commit comments

Comments
 (0)