summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb64
1 files changed, 64 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb
new file mode 100644
index 0000000..bc39afa
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb
@@ -0,0 +1,64 @@
1SUMMARY = "bpftrace"
2HOMEPAGE = "https://github.com/iovisor/bpftrace"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
5
6DEPENDS += "bison-native \
7 flex-native \
8 gzip-native \
9 elfutils \
10 bcc \
11 systemtap \
12 libcereal \
13 libbpf \
14 "
15DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native', '', d)}"
16
17RDEPENDS:${PN} += "bash python3 xz"
18
19PV .= "+git"
20
21SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \
22 file://0001-replace-python-with-python3-in-the-test.patch \
23 file://0002-ast-Repace-getInt8PtrTy-with-getPtrTy.patch \
24 file://0003-ast-Adjust-to-enum-changes-in-llvm-18.patch \
25 file://0004-cmake-Bump-max-LLVM-version-to-18.patch \
26 file://run-ptest \
27"
28SRCREV = "fe6362b4e2c1b9d0833c7d3f308c1d4006b54723"
29
30S = "${WORKDIR}/git"
31
32inherit cmake ptest
33
34PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
35
36PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native"
37
38do_install_ptest() {
39 if [ -e ${B}/tests/bpftrace_test ]; then
40 install -Dm 755 ${B}/tests/bpftrace_test ${D}${PTEST_PATH}/tests/bpftrace_test
41 cp -rf ${B}/tests/runtime ${D}${PTEST_PATH}/tests
42 cp -rf ${B}/tests/test* ${D}${PTEST_PATH}/tests
43 fi
44}
45
46def llvm_major_version(d):
47 pvsplit = d.getVar('LLVMVERSION').split('.')
48 return pvsplit[0]
49
50LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}"
51
52EXTRA_OECMAKE = " \
53 -DCMAKE_ENABLE_EXPORTS=1 \
54 -DCMAKE_BUILD_TYPE=Release \
55 -DUSE_SYSTEM_BPF_BCC=ON \
56 -DENABLE_MAN=OFF \
57"
58
59COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux"
60COMPATIBLE_HOST:libc-musl = "null"
61
62INHIBIT_PACKAGE_STRIP_FILES += "\
63 ${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \
64"