Skip to content

Commit 8a635c3

Browse files
lenticularis39rostedt
authored andcommitted
tools/build: Add bpftool-skeletons feature test
Add bpftool-skeletons feature test, testing the presence of a bpftool capable of generating skeletons. This is to be used for tools that do not require building their own bootstrap bpftool from the kernel source tree. Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Gabriele Monaco <[email protected]> Cc: Clark Williams <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 6fa5e3a commit 8a635c3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

tools/build/Makefile.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ FEATURE_TESTS_EXTRA := \
135135
libbpf-bpf_create_map \
136136
libpfm4 \
137137
libdebuginfod \
138-
clang-bpf-co-re
138+
clang-bpf-co-re \
139+
bpftool-skeletons
139140

140141

141142
FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)

tools/build/feature/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ $(OUTPUT)test-file-handle.bin:
418418
$(OUTPUT)test-libpfm4.bin:
419419
$(BUILD) -lpfm
420420

421+
$(OUTPUT)test-bpftool-skeletons.bin:
422+
$(BPFTOOL) version | grep '^features:.*skeletons' \
423+
> $(@:.bin=.make.output) 2>&1
421424
###############################
422425

423426
clean:

tools/scripts/Makefile.include

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ LLVM_CONFIG ?= llvm-config
9191
LLVM_OBJCOPY ?= llvm-objcopy
9292
LLVM_STRIP ?= llvm-strip
9393

94+
# Some tools require bpftool
95+
BPFTOOL ?= bpftool
96+
9497
ifeq ($(CC_NO_CLANG), 1)
9598
EXTRA_WARNINGS += -Wstrict-aliasing=3
9699

0 commit comments

Comments
 (0)