diff options
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.bb | 64 |
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 @@ | |||
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 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native', '', d)}" | ||
16 | |||
17 | RDEPENDS:${PN} += "bash python3 xz" | ||
18 | |||
19 | PV .= "+git" | ||
20 | |||
21 | SRC_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 | " | ||
28 | SRCREV = "fe6362b4e2c1b9d0833c7d3f308c1d4006b54723" | ||
29 | |||
30 | S = "${WORKDIR}/git" | ||
31 | |||
32 | inherit cmake ptest | ||
33 | |||
34 | PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" | ||
35 | |||
36 | PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native" | ||
37 | |||
38 | do_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 | |||
46 | def llvm_major_version(d): | ||
47 | pvsplit = d.getVar('LLVMVERSION').split('.') | ||
48 | return pvsplit[0] | ||
49 | |||
50 | LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}" | ||
51 | |||
52 | EXTRA_OECMAKE = " \ | ||
53 | -DCMAKE_ENABLE_EXPORTS=1 \ | ||
54 | -DCMAKE_BUILD_TYPE=Release \ | ||
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" | ||
61 | |||
62 | INHIBIT_PACKAGE_STRIP_FILES += "\ | ||
63 | ${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \ | ||
64 | " | ||