From 73cfe6b02642296de161235ae98e7252b60a6e0e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 4 Feb 2022 09:10:30 -0800 Subject: bcc: Upgrade to 0.24.0 Drop upstreamed patch 0001-Remove-APInt-APSInt-toString-std-string-variants.patch Signed-off-by: Khem Raj --- ...MakeLists.txt-override-the-PY_CMD_ESCAPED.patch | 7 +-- ...APInt-APSInt-toString-std-string-variants.patch | 42 ---------------- ...eLists.txt-Remove-check-for-host-etc-debi.patch | 7 +-- .../0001-tools-trace.py-Fix-failing-to-exit.patch | 19 +++----- .../recipes-devtools/bcc/bcc_0.20.0.bb | 57 ---------------------- .../recipes-devtools/bcc/bcc_0.24.0.bb | 56 +++++++++++++++++++++ 6 files changed, 65 insertions(+), 123 deletions(-) delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Remove-APInt-APSInt-toString-std-string-variants.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb create mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch index a08c109..3e0a6aa 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch @@ -19,11 +19,9 @@ Signed-off-by: Mingli Yu src/python/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt -index 797e0d14..8afa6ffa 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt -@@ -12,7 +12,7 @@ file(GLOB_RECURSE PYTHON_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} +@@ -12,7 +12,7 @@ file(GLOB_RECURSE PYTHON_INCLUDES RELATI foreach(PY_CMD ${PYTHON_CMD}) string(REPLACE "/" "-" PY_CMD_ESCAPED ${PY_CMD}) @@ -41,6 +39,3 @@ index 797e0d14..8afa6ffa 100644 install( CODE " --- -2.26.2 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Remove-APInt-APSInt-toString-std-string-variants.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Remove-APInt-APSInt-toString-std-string-variants.patch deleted file mode 100644 index c41e2e2..0000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Remove-APInt-APSInt-toString-std-string-variants.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3a402d393a02cca4ccbf46e1c9eadb31e33d9753 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 14 Jun 2021 12:49:43 -0700 -Subject: [PATCH] Remove APInt/APSInt toString() std::string variants - -clang 13+ has removed this in favour of a pair of llvm::toString -() helpers inside StringExtras.h to improve compile speed by avoiding -hits on header - -Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/3488] -Signed-off-by: Khem Raj ---- - src/cc/json_map_decl_visitor.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/cc/json_map_decl_visitor.cc b/src/cc/json_map_decl_visitor.cc -index eff4d067..53896199 100644 ---- a/src/cc/json_map_decl_visitor.cc -+++ b/src/cc/json_map_decl_visitor.cc -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include "common.h" - #include "table_desc.h" - -@@ -79,7 +80,11 @@ void BMapDeclVisitor::genJSONForField(FieldDecl *F) { - result_ += "["; - TraverseDecl(F); - if (const ConstantArrayType *T = dyn_cast(F->getType())) -+#if LLVM_MAJOR_VERSION >= 13 -+ result_ += ", [" + toString(T->getSize(), 10, false) + "]"; -+#else - result_ += ", [" + T->getSize().toString(10, false) + "]"; -+#endif - if (F->isBitField()) - result_ += ", " + to_string(F->getBitWidthValue(C)); - result_ += "], "; --- -2.32.0 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch index 4d71b15..4d5ceda 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch @@ -20,12 +20,10 @@ Signed-off-by: Ovidiu Panait src/python/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) -diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt -index fa602397..797e0d14 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -5,10 +5,6 @@ if(NOT PYTHON_CMD) - set(PYTHON_CMD "python") + set(PYTHON_CMD "python3") endif() -if(EXISTS "/etc/debian_version") @@ -35,6 +33,3 @@ index fa602397..797e0d14 100644 file(GLOB_RECURSE PYTHON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.py) file(GLOB_RECURSE PYTHON_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} --- -2.17.1 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch index e39e21f..6ac7219 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch @@ -28,19 +28,14 @@ Signed-off-by: He Zhe tools/trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/tools/trace.py b/tools/trace.py -index 7a61594f..d09dd2a8 100755 --- a/tools/trace.py +++ b/tools/trace.py -@@ -627,7 +627,7 @@ BPF_PERF_OUTPUT(%s); - Probe.event_count += 1 - if Probe.max_events is not None and \ - Probe.event_count >= Probe.max_events: -- exit() -+ os._exit(0) - sys.stdout.flush() +@@ -671,7 +671,7 @@ BPF_PERF_OUTPUT(%s); + if self.aggregate: + self.print_aggregate_events() + sys.stdout.flush() +- exit() ++ os._exit(0) def attach(self, bpf, verbose): --- -2.17.1 - + if len(self.library) == 0: diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb deleted file mode 100644 index d9b476d..0000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb +++ /dev/null @@ -1,57 +0,0 @@ -SUMMARY = "BPF Compiler Collection (BCC)" -HOMEPAGE = "https://github.com/iovisor/bcc" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" - -inherit cmake python3native manpages - -DEPENDS += "bison-native \ - flex-native \ - flex \ - elfutils \ - ${LUAJIT} \ - clang \ - " - -LUAJIT ?= "luajit" -LUAJIT:powerpc64le = "" -LUAJIT:powerpc64 = "" - -RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" - -SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \ - file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ - file://0001-tools-trace.py-Fix-failing-to-exit.patch \ - file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ - file://0001-Remove-APInt-APSInt-toString-std-string-variants.patch \ - " - -SRCREV = "b2a76fa63f19036fbc9b3a705fbfa6358992ae22" - -PV .= "+git${SRCPV}" - -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= "examples" -PACKAGECONFIG:remove:libc-musl = "examples" - -PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," -PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," - -EXTRA_OECMAKE = " \ - -DENABLE_LLVM_SHARED=ON \ - -DENABLE_CLANG_JIT=ON \ - -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ - -DPYTHON_CMD=${PYTHON} \ - -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ -" - -do_install:append() { - sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ - -i $(find ${D}${datadir}/${PN} -type f) -} - -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" -FILES:${PN}-doc += "${datadir}/${PN}/man" - -COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb new file mode 100644 index 0000000..65831c3 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb @@ -0,0 +1,56 @@ +SUMMARY = "BPF Compiler Collection (BCC)" +HOMEPAGE = "https://github.com/iovisor/bcc" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" + +inherit cmake python3native manpages + +DEPENDS += "bison-native \ + flex-native \ + flex \ + elfutils \ + ${LUAJIT} \ + clang \ + " + +LUAJIT ?= "luajit" +LUAJIT:powerpc64le = "" +LUAJIT:powerpc64 = "" + +RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" + +SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \ + file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ + file://0001-tools-trace.py-Fix-failing-to-exit.patch \ + file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ + " + +SRCREV = "8f40d6f57a8d94e7aee74ce358572d34d31b4ed4" + +PV .= "+git${SRCPV}" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "examples" +PACKAGECONFIG:remove:libc-musl = "examples" + +PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," +PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," + +EXTRA_OECMAKE = " \ + -DENABLE_LLVM_SHARED=ON \ + -DENABLE_CLANG_JIT=ON \ + -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ + -DPYTHON_CMD=${PYTHON} \ + -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ +" + +do_install:append() { + sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ + -i $(find ${D}${datadir}/${PN} -type f) +} + +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" +FILES:${PN}-doc += "${datadir}/${PN}/man" + +COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" -- cgit v1.2.3-54-g00ecf