History

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.

Tomas Glozar committed 1 year ago

Commit 8a635c31 parent 6fa5e3a3 files · +8 −1Browse files

Unified · Split

3 files
  1. tools/build/Makefile.feature +2 −1
  2. tools/build/feature/Makefile +3 −0
  3. tools/scripts/Makefile.include +3 −0
tools/build/Makefile.feature+2−1
@@ -135,7 +135,8 @@ FEATURE_TESTS_EXTRA := \ · 134 unmodified lines
135 libbpf-bpf_create_map \135 libbpf-bpf_create_map \
136 libpfm4 \136 libpfm4 \
137 libdebuginfod \137 libdebuginfod \
138 clang-bpf-co-re138 clang-bpf-co-re \
139 bpftool-skeletons
139 140
140 141
141FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)142FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)
tools/build/feature/Makefile+3−0
@@ -418,6 +418,9 @@ $(OUTPUT)test-file-handle.bin: · 417 unmodified lines
418$(OUTPUT)test-libpfm4.bin:418$(OUTPUT)test-libpfm4.bin:
419 $(BUILD) -lpfm419 $(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
423clean:426clean:
tools/scripts/Makefile.include+3−0
@@ -91,6 +91,9 @@ LLVM_CONFIG ?= llvm-config · 90 unmodified lines
91LLVM_OBJCOPY ?= llvm-objcopy91LLVM_OBJCOPY ?= llvm-objcopy
92LLVM_STRIP ?= llvm-strip92LLVM_STRIP ?= llvm-strip
93 93
94# Some tools require bpftool
95BPFTOOL ?= bpftool
96
94ifeq ($(CC_NO_CLANG), 1)97ifeq ($(CC_NO_CLANG), 1)
95EXTRA_WARNINGS += -Wstrict-aliasing=398EXTRA_WARNINGS += -Wstrict-aliasing=3
96 99