Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Link: https://lore.kernel.org/20250218145859.27762-3-tglozar@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Tomas Glozar and committed by
Steven Rostedt (Google)
8a635c38 6fa5e3a8

+8 -1
+2 -1
tools/build/Makefile.feature
··· 135 135 libbpf-bpf_create_map \ 136 136 libpfm4 \ 137 137 libdebuginfod \ 138 - clang-bpf-co-re 138 + clang-bpf-co-re \ 139 + bpftool-skeletons 139 140 140 141 141 142 FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)
+3
tools/build/feature/Makefile
··· 418 418 $(OUTPUT)test-libpfm4.bin: 419 419 $(BUILD) -lpfm 420 420 421 + $(OUTPUT)test-bpftool-skeletons.bin: 422 + $(BPFTOOL) version | grep '^features:.*skeletons' \ 423 + > $(@:.bin=.make.output) 2>&1 421 424 ############################### 422 425 423 426 clean:
+3
tools/scripts/Makefile.include
··· 91 91 LLVM_OBJCOPY ?= llvm-objcopy 92 92 LLVM_STRIP ?= llvm-strip 93 93 94 + # Some tools require bpftool 95 + BPFTOOL ?= bpftool 96 + 94 97 ifeq ($(CC_NO_CLANG), 1) 95 98 EXTRA_WARNINGS += -Wstrict-aliasing=3 96 99