From 4ad01522d403101590b772c48eec59feb15ae22b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Mar 2023 00:04:55 -0800 Subject: bpftrace: Upgrade to 0.17.0 Use system provided bpf and bcc Signed-off-by: Khem Raj --- .../recipes-devtools/bpftrace/bpftrace_0.16.0.bb | 58 --------------------- .../recipes-devtools/bpftrace/bpftrace_0.17.0.bb | 59 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 58 deletions(-) delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.16.0.bb create mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.16.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.16.0.bb deleted file mode 100644 index ca324bc..0000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.16.0.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "bpftrace" -HOMEPAGE = "https://github.com/iovisor/bpftrace" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -DEPENDS += "bison-native \ - flex-native \ - gzip-native \ - elfutils \ - bcc \ - systemtap \ - libcereal \ - libbpf \ - " - -PV .= "+git${SRCREV}" -RDEPENDS:${PN} += "bash python3 xz" - -SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ - file://run-ptest \ -" -SRCREV = "a277ec42102c463d656df8f64eb2f7e87e322210" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" - -# Clang-15.x crashes compiling some usdt tests -# see https://github.com/llvm/llvm-project/issues/58477 -PACKAGECONFIG:remove:riscv64 = "tests" - -PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native" - -do_install_ptest() { - if [ -e ${B}/tests/bpftrace_test ]; then - install -Dm 755 ${B}/tests/bpftrace_test ${D}${PTEST_PATH}/tests/bpftrace_test - cp -rf ${B}/tests/runtime ${D}${PTEST_PATH}/tests - cp -rf ${B}/tests/test* ${D}${PTEST_PATH}/tests - fi -} - -def llvm_major_version(d): - pvsplit = d.getVar('LLVMVERSION').split('.') - return pvsplit[0] - -LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}" - -EXTRA_OECMAKE = " \ - -DCMAKE_ENABLE_EXPORTS=1 \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_REQUESTED_VERSION=${LLVM_MAJOR_VERSION} \ - -DENABLE_MAN=OFF \ -" - -COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" -COMPATIBLE_HOST:libc-musl = "null" 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 @@ +SUMMARY = "bpftrace" +HOMEPAGE = "https://github.com/iovisor/bpftrace" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS += "bison-native \ + flex-native \ + gzip-native \ + elfutils \ + bcc \ + systemtap \ + libcereal \ + libbpf \ + " + +PV .= "+git${SRCREV}" +RDEPENDS:${PN} += "bash python3 xz" + +SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ + file://run-ptest \ +" +SRCREV = "1326f040a0f88287ccbc8c18fe8956bca4cc225d" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" + +# Clang-15.x crashes compiling some usdt tests +# see https://github.com/llvm/llvm-project/issues/58477 +PACKAGECONFIG:remove:riscv64 = "tests" + +PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native" + +do_install_ptest() { + if [ -e ${B}/tests/bpftrace_test ]; then + install -Dm 755 ${B}/tests/bpftrace_test ${D}${PTEST_PATH}/tests/bpftrace_test + cp -rf ${B}/tests/runtime ${D}${PTEST_PATH}/tests + cp -rf ${B}/tests/test* ${D}${PTEST_PATH}/tests + fi +} + +def llvm_major_version(d): + pvsplit = d.getVar('LLVMVERSION').split('.') + return pvsplit[0] + +LLVM_MAJOR_VERSION = "${@llvm_major_version(d)}" + +EXTRA_OECMAKE = " \ + -DCMAKE_ENABLE_EXPORTS=1 \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_REQUESTED_VERSION=${LLVM_MAJOR_VERSION} \ + -DUSE_SYSTEM_BPF_BCC=ON \ + -DENABLE_MAN=OFF \ +" + +COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" +COMPATIBLE_HOST:libc-musl = "null" -- cgit v1.2.3-54-g00ecf