Files
buildroot/package/bpftrace/Config.in
Thomas Petazzoni cc25888c88 package/bpftrace: bump to version 0.26.1 to fix build with LLVM 22
Since Buildroot commit 25cb3813e7 which
bumped LLVM from 21.x to 22.x, the build of bpftrace is broken as
bpftrace 0.24.2 only supports LLVM up to 21.

We tried backporting the bpftrace patch that allows using LLVM up to
version 22 but the patch didn't apply cleanly but more importantly it
wasn't clear if this patch was sufficient. Therefore, we opt for
bumping bpftrace entirely to fix the issue.

Packaging changes:

- The new version of bpftrace no longer needs host-bison/host-flex,
  because bpftrace is now using a handwritten parser.

- Pass -DUSE_SYSTEM_LIBBPF:BOOL=ON to ensure the system libbpf version
  is used, and not the bundled version

- Now depends on kernel headers >= 5.10 because it needs CAP_BPF and
  CAP_PERFMON

Upstream changelog:
https://github.com/bpftrace/bpftrace/blob/v0.26.1/CHANGELOG.md

Fixes:

  https://autobuild.buildroot.net/results/a3e3fd696685864977c688aa11c2653357cf6207/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Julien: add link to upstream changelog]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-08-28 11:47:12 +02:00

57 lines
2.2 KiB
Plaintext

config BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
bool
default y if BR2_aarch64 || BR2_aarch64_be
default y if BR2_x86_64
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
config BR2_PACKAGE_BPFTRACE
bool "bpftrace"
depends on BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
depends on BR2_USE_MMU # bcc -> python3
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libbpf
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # bcc
depends on BR2_TOOLCHAIN_USES_GLIBC # bcc
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # bcc -> clang
depends on BR2_INSTALL_LIBSTDCPP # bcc -> clang
depends on BR2_HOST_GCC_AT_LEAST_7 # bcc -> clang
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 # CAP_BPF, CAP_PERFMON
depends on BR2_USE_WCHAR # bcc -> clang, bcc -> python3, libbpf
depends on BR2_TOOLCHAIN_HAS_THREADS # bcc -> clang, bcc -> python3, libbpf
depends on !BR2_STATIC_LIBS # bcc -> clang, bcc -> python3, libbpf
select BR2_PACKAGE_BCC
select BR2_PACKAGE_BZIP2
select BR2_PACKAGE_CEREAL
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_LIBBPF
select BR2_PACKAGE_LLVM
# LLVM RTTI mendatory: https://github.com/iovisor/bpftrace/issues/1156
select BR2_PACKAGE_LLVM_RTTI
select BR2_PACKAGE_XZ
help
bpftrace is a high-level tracing language for Linux enhanced
Berkeley Packet Filter (eBPF) available in recent Linux
kernels (4.x).
bpftrace uses LLVM as a backend to compile scripts to
BPF-bytecode and makes use of BCC for interacting with the
Linux BPF system, as well as existing Linux tracing
capabilities: kernel dynamic tracing (kprobes), user-level
dynamic tracing (uprobes), and tracepoints. The bpftrace
language is inspired by awk and C, and predecessor tracers
such as DTrace and SystemTap.
It's highly recommended to NOT strip bpftrace binary.
To do so, add "bpftrace" to BR2_STRIP_EXCLUDE_FILES.
See:
https://bugzilla.redhat.com/show_bug.cgi?id=1865787
https://www.github.com/iovisor/bpftrace
comment "bpftrace needs a glibc toolchain w/ C++, gcc >= 7, host gcc >= 7, kernel headers >= 5.10"
depends on BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_HOST_GCC_AT_LEAST_7 \
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10