From: Ian Rogers <irogers@google.com>
To: irogers@google.com
Cc: acme@kernel.org, adrian.hunter@intel.com,
alexander.shishkin@linux.intel.com, derek.foreman@collabora.com,
james.clark@linaro.org, jolsa@kernel.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
mark.rutland@arm.com, mathieu.desnoyers@efficios.com,
mingo@redhat.com, mjeanson@efficios.com, namhyung@kernel.org
Subject: [PATCH 1/2] tools build: Add libbabeltrace2 feature test
Date: Tue, 12 May 2026 14:56:20 -0700 [thread overview]
Message-ID: <20260512215621.468685-1-irogers@google.com> (raw)
In-Reply-To: <CAP-5=fXMtbO=7JMg2YvhQNbqOEFH_ze=8EifYM7bDfR945=KHA@mail.gmail.com>
libbabeltrace2 is a rewrite libbabeltrace from 2020, add support for
detecting it so that perf builds may prefer using it to libbabeltrace
which dates from 2010.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/build/Makefile.feature | 1 +
tools/build/feature/Makefile | 4 ++++
tools/build/feature/test-libbabeltrace2.c | 9 +++++++++
3 files changed, 14 insertions(+)
create mode 100644 tools/build/feature/test-libbabeltrace2.c
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 2f192d3bf61b..5425430582d2 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -114,6 +114,7 @@ FEATURE_TESTS_EXTRA := \
gtk2-infobar \
hello \
libbabeltrace \
+ libbabeltrace2 \
libcapstone \
libcheck \
libbfd-liberty \
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 704c687ed3ad..9cf00d3fbefb 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -49,6 +49,7 @@ FILES= \
test-stackprotector-all.bin \
test-timerfd.bin \
test-libbabeltrace.bin \
+ test-libbabeltrace2.bin \
test-libcapstone.bin \
test-libcheck.bin \
test-compile-32.bin \
@@ -311,6 +312,9 @@ $(OUTPUT)test-timerfd.bin:
$(OUTPUT)test-libbabeltrace.bin:
$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
+$(OUTPUT)test-libbabeltrace2.bin:
+ $(BUILD) # -lbabeltrace2 provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace2)
+
$(OUTPUT)test-libcapstone.bin:
$(BUILD) # -lcapstone provided by $(FEATURE_CHECK_LDFLAGS-libcapstone)
diff --git a/tools/build/feature/test-libbabeltrace2.c b/tools/build/feature/test-libbabeltrace2.c
new file mode 100644
index 000000000000..0c964994a34e
--- /dev/null
+++ b/tools/build/feature/test-libbabeltrace2.c
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <babeltrace2/babeltrace.h>
+
+int main(void)
+{
+ bt_graph_create(0);
+ return 0;
+}
--
2.54.0.563.g4f69b47b94-goog
next prev parent reply other threads:[~2026-05-12 21:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 19:47 [PATCH] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer Michael Jeanson
2026-05-12 21:54 ` Ian Rogers
2026-05-12 21:56 ` Ian Rogers [this message]
2026-05-12 21:56 ` [PATCH 2/2] perf data convert ctf: Initial babeltrace2 support Ian Rogers
2026-05-13 14:14 ` [PATCH] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer Michael Jeanson
2026-05-13 16:06 ` Ian Rogers
2026-05-13 16:05 ` [PATCH v2] " Michael Jeanson
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=20260512215621.468685-1-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=derek.foreman@collabora.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=mjeanson@efficios.com \
--cc=namhyung@kernel.org \
/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