From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Tomas Glozar <tglozar@redhat.com>, John Kacur <jkacur@redhat.com>,
Luis Goncalves <lgoncalv@redhat.com>,
Gabriele Monaco <gmonaco@redhat.com>,
Clark Williams <williams@redhat.com>
Subject: [for-next][PATCH 02/10] tools/build: Add bpftool-skeletons feature test
Date: Thu, 06 Mar 2025 13:18:03 -0500 [thread overview]
Message-ID: <20250306181825.696586340@goodmis.org> (raw)
In-Reply-To: 20250306181801.485766945@goodmis.org
From: Tomas Glozar <tglozar@redhat.com>
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 | 3 ++-
tools/build/feature/Makefile | 3 +++
tools/scripts/Makefile.include | 3 +++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 1931b6321314..1f44ca677ad3 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -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)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index cb1e3e2feedf..4f9c1d950f5d 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -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:
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 0aa4005017c7..71bbe52721b3 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -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
--
2.47.2
next prev parent reply other threads:[~2025-03-06 18:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 18:18 [for-next][PATCH 00/10] tools/tracing: Updates for v6.15 Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 01/10] rtla/timerlat: Unify params struct Steven Rostedt
2025-03-06 18:18 ` Steven Rostedt [this message]
2025-03-06 18:18 ` [for-next][PATCH 03/10] rtla: Add optional dependency on BPF tooling Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 04/10] rtla/timerlat: Add BPF skeleton to collect samples Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 05/10] rtla/timerlat_hist: Use BPF " Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 06/10] rtla/timerlat_top: Move divisor to update Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 07/10] rtla/timerlat_top: Use BPF to collect samples Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 08/10] rtla/timerlat: Test BPF mode Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 09/10] tools/rv: Keep user LDFLAGS in build Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 10/10] rtla: Refactor save_trace_to_file Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306181825.696586340@goodmis.org \
--to=rostedt@goodmis.org \
--cc=gmonaco@redhat.com \
--cc=jkacur@redhat.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglozar@redhat.com \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox