]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/build: Add bpftool-skeletons feature test
authorTomas Glozar <tglozar@redhat.com>
Tue, 18 Feb 2025 14:58:53 +0000 (15:58 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 4 Mar 2025 17:35:17 +0000 (12:35 -0500)
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>
tools/build/Makefile.feature
tools/build/feature/Makefile
tools/scripts/Makefile.include

index 1931b6321314684c3458ebf35edef8c14257f858..1f44ca677ad3d68a73b498cb711262c44d8c6122 100644 (file)
@@ -135,7 +135,8 @@ FEATURE_TESTS_EXTRA :=                  \
          libbpf-bpf_create_map         \
          libpfm4                        \
          libdebuginfod                 \
-         clang-bpf-co-re
+         clang-bpf-co-re               \
+         bpftool-skeletons
 
 
 FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)
index cb1e3e2feedf39d7b95442bafc87d43dc84a740d..4f9c1d950f5db5b3afab442f4823e3461d2d1b89 100644 (file)
@@ -418,6 +418,9 @@ $(OUTPUT)test-file-handle.bin:
 $(OUTPUT)test-libpfm4.bin:
        $(BUILD) -lpfm
 
+$(OUTPUT)test-bpftool-skeletons.bin:
+       $(BPFTOOL) version | grep '^features:.*skeletons' \
+               > $(@:.bin=.make.output) 2>&1
 ###############################
 
 clean:
index 0aa4005017c72f10bb7c5e47bc78ec81718c47ef..71bbe52721b35fdaada3b1d9cec73fd0015a9207 100644 (file)
@@ -91,6 +91,9 @@ LLVM_CONFIG   ?= llvm-config
 LLVM_OBJCOPY   ?= llvm-objcopy
 LLVM_STRIP     ?= llvm-strip
 
+# Some tools require bpftool
+BPFTOOL                ?= bpftool
+
 ifeq ($(CC_NO_CLANG), 1)
 EXTRA_WARNINGS += -Wstrict-aliasing=3