From 48e3e6ec3f6cf7d8d4261c9cee12ba4190bf1dfa Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 12 Mar 2025 13:35:04 -0700 Subject: bpftrace: Upgrade to 0.23.x branch This is targetting clang-20 support. Signed-off-by: Khem Raj --- .../0001-cmake-Bump-max-LLVM-version-to-19.patch | 24 --------- ...Lists.txt-allow-to-set-BISON_FLAGS-like-l.patch | 6 +-- .../recipes-devtools/bpftrace/bpftrace_0.21.2.bb | 60 ---------------------- .../recipes-devtools/bpftrace/bpftrace_0.23.0.bb | 59 +++++++++++++++++++++ 4 files changed, 61 insertions(+), 88 deletions(-) delete mode 100644 dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Bump-max-LLVM-version-to-19.patch delete mode 100644 dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.21.2.bb create mode 100644 dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.0.bb (limited to 'dynamic-layers/meta-python') diff --git a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Bump-max-LLVM-version-to-19.patch b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Bump-max-LLVM-version-to-19.patch deleted file mode 100644 index 88dc60b..0000000 --- a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Bump-max-LLVM-version-to-19.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 16186113346c268a0bb45424ba1c41768b7e94cf Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 16 Feb 2024 10:14:41 -0800 -Subject: [PATCH] cmake: Bump max LLVM version to 19 - -Upstream-Status: Submitted [https://github.com/bpftrace/bpftrace/pull/3433] -Signed-off-by: Khem Raj ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/CMakeLists.txt -=================================================================== ---- git.orig/CMakeLists.txt -+++ git/CMakeLists.txt -@@ -152,7 +152,7 @@ else() - endif() - - set(MIN_LLVM_MAJOR 13) --set(MAX_LLVM_MAJOR 18) -+set(MAX_LLVM_MAJOR 19) - - if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR})) - message(SEND_ERROR "Unsupported LLVM version found via ${LLVM_INCLUDE_DIRS}: ${LLVM_VERSION_MAJOR}") diff --git a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch index 661dbca..4f0ebbf 100644 --- a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch +++ b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch @@ -10,11 +10,9 @@ Upstream-Status: Pending CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2b60fa26..89bead59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -100,16 +100,20 @@ include_directories(SYSTEM ${LIBCEREAL_INCLUDE_DIRS}) +@@ -100,16 +100,20 @@ include_directories(SYSTEM ${LIBCEREAL_I find_package(BISON REQUIRED) find_package(FLEX REQUIRED) @@ -36,5 +34,5 @@ index 2b60fa26..89bead59 100644 -flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc) +flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc COMPILE_FLAGS ${FLEX_FLAGS}) add_flex_bison_dependency(flex_lexer bison_parser) - add_library(parser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS}) + add_library(parser STATIC ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS}) target_compile_options(parser PRIVATE "-w") diff --git a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.21.2.bb b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.21.2.bb deleted file mode 100644 index 4c888e7..0000000 --- a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.21.2.bb +++ /dev/null @@ -1,60 +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 \ - " -DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native', '', d)}" - -RDEPENDS:${PN} += "bash python3 xz" - -PV .= "+git" - -SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ - file://run-ptest \ - file://0001-cmake-Bump-max-LLVM-version-to-19.patch \ - file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \ -" -SRCREV = "b2e255870ba010d4a7e4852bffcf1c567b016fd0" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" - -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 -} - -EXTRA_OECMAKE = " \ - -DCMAKE_ENABLE_EXPORTS=1 \ - -DCMAKE_BUILD_TYPE=Release \ - -DUSE_SYSTEM_BPF_BCC=ON \ - -DENABLE_MAN=OFF \ - -DBISON_FLAGS='--file-prefix-map=${WORKDIR}=' \ -" - -COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" -COMPATIBLE_HOST:libc-musl = "null" - -INHIBIT_PACKAGE_STRIP_FILES += "\ - ${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \ -" - -WARN_QA:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' buildpaths', '', d)}" -ERROR_QA:remove = "${@bb.utils.contains('PTEST_ENABLED', '1', 'buildpaths', '', d)}" diff --git a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.0.bb b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.0.bb new file mode 100644 index 0000000..3dd2a5f --- /dev/null +++ b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.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 \ + " +DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native', '', d)}" + +RDEPENDS:${PN} += "bash python3 xz" + +PV .= "+git" + +SRC_URI = "git://github.com/iovisor/bpftrace;branch=release/0.23.x;protocol=https \ + file://run-ptest \ + file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \ +" +SRCREV = "339a2f571505616832379ca216627aceb0e5d0bb" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" + +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 +} + +EXTRA_OECMAKE = " \ + -DCMAKE_ENABLE_EXPORTS=1 \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_SYSTEM_BPF_BCC=ON \ + -DENABLE_MAN=OFF \ + -DBISON_FLAGS='--file-prefix-map=${WORKDIR}=' \ +" + +COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" +COMPATIBLE_HOST:libc-musl = "null" + +INHIBIT_PACKAGE_STRIP_FILES += "\ + ${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \ +" + +WARN_QA:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' buildpaths', '', d)}" +ERROR_QA:remove = "${@bb.utils.contains('PTEST_ENABLED', '1', 'buildpaths', '', d)}" -- cgit v1.2.3-54-g00ecf