summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.18.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.18.0.bb')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.18.0.bb60
1 files changed, 60 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.18.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.18.0.bb
new file mode 100644
index 0000000..0d7261f
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.18.0.bb
@@ -0,0 +1,60 @@
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://0001-cmake-Raise-max-llvm-major-version-to-16.patch \
21 file://run-ptest \
22"
23SRCREV = "e199c7e73da84bff9fe744d1e3402c2b505aa5a2"
24
25S = "${WORKDIR}/git"
26
27inherit cmake ptest
28
29PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
30
31# Clang-15.x crashes compiling some usdt tests
32# see https://github.com/llvm/llvm-project/issues/58477
33PACKAGECONFIG:remove:riscv64 = "tests"
34
35PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native"
36
37do_install_ptest() {
38 if [ -e ${B}/tests/bpftrace_test ]; then
39 install -Dm 755 ${B}/tests/bpftrace_test ${D}${PTEST_PATH}/tests/bpftrace_test
40 cp -rf ${B}/tests/runtime ${D}${PTEST_PATH}/tests
41 cp -rf ${B}/tests/test* ${D}${PTEST_PATH}/tests
42 fi
43}
44
45def llvm_major_version(d):
46 pvsplit = d.getVar('LLVMVERSION').split('.')
47 return pvsplit[0]
48
49LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}"
50
51EXTRA_OECMAKE = " \
52 -DCMAKE_ENABLE_EXPORTS=1 \
53 -DCMAKE_BUILD_TYPE=Release \
54 -DLLVM_REQUESTED_VERSION=${LLVM_MAJOR_VERSION} \
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"