diff options
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.bb | 60 |
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 @@ | |||
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://0001-cmake-Raise-max-llvm-major-version-to-16.patch \ | ||
21 | file://run-ptest \ | ||
22 | " | ||
23 | SRCREV = "e199c7e73da84bff9fe744d1e3402c2b505aa5a2" | ||
24 | |||
25 | S = "${WORKDIR}/git" | ||
26 | |||
27 | inherit cmake ptest | ||
28 | |||
29 | PACKAGECONFIG ?= "${@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 | ||
33 | PACKAGECONFIG:remove:riscv64 = "tests" | ||
34 | |||
35 | PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native" | ||
36 | |||
37 | do_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 | |||
45 | def llvm_major_version(d): | ||
46 | pvsplit = d.getVar('LLVMVERSION').split('.') | ||
47 | return pvsplit[0] | ||
48 | |||
49 | LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}" | ||
50 | |||
51 | EXTRA_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 | |||
59 | COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" | ||
60 | COMPATIBLE_HOST:libc-musl = "null" | ||