diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb new file mode 100644 index 0000000..36c6192 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb | |||
@@ -0,0 +1,71 @@ | |||
1 | SUMMARY = "BPF Compiler Collection (BCC)" | ||
2 | HOMEPAGE = "https://github.com/iovisor/bcc" | ||
3 | LICENSE = "Apache-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" | ||
5 | |||
6 | inherit cmake python3native manpages ptest | ||
7 | |||
8 | DEPENDS += "bison-native \ | ||
9 | flex-native \ | ||
10 | flex \ | ||
11 | elfutils \ | ||
12 | ${LUAJIT} \ | ||
13 | clang \ | ||
14 | libbpf \ | ||
15 | " | ||
16 | |||
17 | LUAJIT ?= "luajit" | ||
18 | LUAJIT:powerpc64le = "" | ||
19 | LUAJIT:powerpc64 = "" | ||
20 | LUAJIT:riscv64 = "" | ||
21 | |||
22 | RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" | ||
23 | RDEPENDS:${PN}-ptest = "cmake python3 python3-distutils python3-netaddr python3-pyroute2" | ||
24 | |||
25 | SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \ | ||
26 | file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ | ||
27 | file://0001-tools-trace.py-Fix-failing-to-exit.patch \ | ||
28 | file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ | ||
29 | file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \ | ||
30 | file://run-ptest \ | ||
31 | file://ptest_wrapper.sh \ | ||
32 | " | ||
33 | |||
34 | SRCREV = "504180036f2e928181bc946572908f0d3aa25fa6" | ||
35 | |||
36 | PV .= "+git${SRCPV}" | ||
37 | |||
38 | S = "${WORKDIR}/git" | ||
39 | |||
40 | PACKAGECONFIG ??= "examples" | ||
41 | PACKAGECONFIG:remove:libc-musl = "examples" | ||
42 | |||
43 | PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," | ||
44 | PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," | ||
45 | |||
46 | EXTRA_OECMAKE = " \ | ||
47 | -DCMAKE_USE_LIBBPF_PACKAGE=ON \ | ||
48 | -DENABLE_LLVM_SHARED=ON \ | ||
49 | -DENABLE_CLANG_JIT=ON \ | ||
50 | -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ | ||
51 | -DPYTHON_CMD=${PYTHON} \ | ||
52 | -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ | ||
53 | " | ||
54 | |||
55 | do_install:append() { | ||
56 | sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ | ||
57 | -i $(find ${D}${datadir}/${PN} -type f) | ||
58 | } | ||
59 | |||
60 | do_install_ptest() { | ||
61 | install -d ${D}${PTEST_PATH}/tests/cc | ||
62 | install ${B}/tests/cc/test_libbcc_no_libbpf ${B}/tests/cc/libusdt_test_lib.so ${D}${PTEST_PATH}/tests/cc | ||
63 | cp -rf ${S}/tests/python ${D}${PTEST_PATH}/tests/python | ||
64 | install ${WORKDIR}/ptest_wrapper.sh ${D}${PTEST_PATH}/tests | ||
65 | install ${S}/examples/networking/simulation.py ${D}${PTEST_PATH}/tests/python | ||
66 | } | ||
67 | |||
68 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" | ||
69 | FILES:${PN}-doc += "${datadir}/${PN}/man" | ||
70 | |||
71 | COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" | ||