diff options
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.bb | 59 |
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 @@ | |||
1 | SUMMARY = "bpftrace" | ||
2 | HOMEPAGE = "https://github.com/iovisor/bpftrace" | ||
3 | LICENSE = "Apache-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
5 | |||
6 | DEPENDS += "bison-native \ | ||
7 | flex-native \ | ||
8 | gzip-native \ | ||
9 | elfutils \ | ||
10 | bcc \ | ||
11 | systemtap \ | ||
12 | libcereal \ | ||
13 | libbpf \ | ||
14 | " | ||
15 | |||
16 | PV .= "+git${SRCREV}" | ||
17 | RDEPENDS:${PN} += "bash python3 xz" | ||
18 | |||
19 | SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ | ||
20 | file://run-ptest \ | ||
21 | " | ||
22 | SRCREV = "1326f040a0f88287ccbc8c18fe8956bca4cc225d" | ||
23 | |||
24 | S = "${WORKDIR}/git" | ||
25 | |||
26 | inherit cmake ptest | ||
27 | |||
28 | PACKAGECONFIG ?= "${@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 | ||
32 | PACKAGECONFIG:remove:riscv64 = "tests" | ||
33 | |||
34 | PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native" | ||
35 | |||
36 | do_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 | |||
44 | def llvm_major_version(d): | ||
45 | pvsplit = d.getVar('LLVMVERSION').split('.') | ||
46 | return pvsplit[0] | ||
47 | |||
48 | LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}" | ||
49 | |||
50 | EXTRA_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 | |||
58 | COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" | ||
59 | COMPATIBLE_HOST:libc-musl = "null" | ||