summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb59
1 files changed, 59 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb
new file mode 100644
index 0000000..ca97683
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb
@@ -0,0 +1,59 @@
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 "
15
16PV .= "+git${SRCREV}"
17RDEPENDS:${PN} += "bash python3 xz"
18
19SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \
20 file://run-ptest \
21"
22SRCREV = "1326f040a0f88287ccbc8c18fe8956bca4cc225d"
23
24S = "${WORKDIR}/git"
25
26inherit cmake ptest
27
28PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
29
30# Clang-15.x crashes compiling some usdt tests
31# see https://github.com/llvm/llvm-project/issues/58477
32PACKAGECONFIG:remove:riscv64 = "tests"
33
34PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native"
35
36do_install_ptest() {
37 if [ -e ${B}/tests/bpftrace_test ]; then
38 install -Dm 755 ${B}/tests/bpftrace_test ${D}${PTEST_PATH}/tests/bpftrace_test
39 cp -rf ${B}/tests/runtime ${D}${PTEST_PATH}/tests
40 cp -rf ${B}/tests/test* ${D}${PTEST_PATH}/tests
41 fi
42}
43
44def llvm_major_version(d):
45 pvsplit = d.getVar('LLVMVERSION').split('.')
46 return pvsplit[0]
47
48LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}"
49
50EXTRA_OECMAKE = " \
51 -DCMAKE_ENABLE_EXPORTS=1 \
52 -DCMAKE_BUILD_TYPE=Release \
53 -DLLVM_REQUESTED_VERSION=${LLVM_MAJOR_VERSION} \
54 -DUSE_SYSTEM_BPF_BCC=ON \
55 -DENABLE_MAN=OFF \
56"
57
58COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux"
59COMPATIBLE_HOST:libc-musl = "null"