From eb92914e31ff872c032155997c42ca8b6e6d82a3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 6 Aug 2021 20:23:05 -0700 Subject: bpftrace: Update to master Fix build with libc++ Signed-off-by: Khem Raj --- .../0001-support-clang-upto-version-13.patch | 11 +++-- ...-ast-Add-missing-standard-header-includes.patch | 49 ++++++++++++++++++++++ .../recipes-devtools/bpftrace/bpftrace_0.13.0.bb | 4 +- 3 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0002-ast-Add-missing-standard-header-includes.patch (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-support-clang-upto-version-13.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-support-clang-upto-version-13.patch index 2272635..c881904 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-support-clang-upto-version-13.patch +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-support-clang-upto-version-13.patch @@ -1,9 +1,9 @@ -From 4cffb745dabde63f6f9c67a95265f5fc670dc1d7 Mon Sep 17 00:00:00 2001 +From 7b2f02a7b7d246b24cf029b3a75d8595b7b3c250 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 5 Aug 2021 22:15:27 -0700 -Subject: [PATCH] support clang upto version 13 +Subject: [PATCH 1/2] support clang upto version 13 -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/iovisor/bpftrace/pull/1962] Signed-off-by: Khem Raj --- CMakeLists.txt | 2 +- @@ -16,12 +16,11 @@ index 86daa195..73744207 100644 @@ -162,7 +162,7 @@ else() find_package(LLVM REQUIRED) endif() - + - if((${LLVM_VERSION_MAJOR} VERSION_LESS 6) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 12)) + if((${LLVM_VERSION_MAJOR} VERSION_LESS 6) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 13)) message(SEND_ERROR "Unsupported LLVM version found: ${LLVM_INCLUDE_DIRS}") message(SEND_ERROR "Specify an LLVM major version using LLVM_REQUESTED_VERSION=") endif() --- +-- 2.32.0 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0002-ast-Add-missing-standard-header-includes.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0002-ast-Add-missing-standard-header-includes.patch new file mode 100644 index 0000000..2d1d0ac --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0002-ast-Add-missing-standard-header-includes.patch @@ -0,0 +1,49 @@ +From 891071a52e2d5e62634bd6cff249f0d7346e66fa Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 6 Aug 2021 20:14:06 -0700 +Subject: [PATCH 2/2] ast: Add missing standard header includes + +This fixes build when using libc++ from clang 13 +Fixes +src/bpforc.h:40:10: error: no template named 'unordered_map' in nam +espace 'std' +| std::unordered_map>; + +src/ast/vtable.h:76:30: error: implicit instantiation of undefined +template 'std::basic_string' +| throw std::runtime_error(std::string("Unknown node: ") + typeid(n).name()); +| ^ + +Upstream-Status: Submitted [https://github.com/iovisor/bpftrace/pull/1962] +Signed-off-by: Khem Raj +--- + src/ast/bpforc/bpforc.h | 1 + + src/ast/vtable.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/ast/bpforc/bpforc.h b/src/ast/bpforc/bpforc.h +index de0ed0c0..1b929dfd 100644 +--- a/src/ast/bpforc/bpforc.h ++++ b/src/ast/bpforc/bpforc.h +@@ -23,6 +23,7 @@ + #endif + + #include ++#include + + namespace bpftrace { + +diff --git a/src/ast/vtable.h b/src/ast/vtable.h +index 49e0f512..b89e6979 100644 +--- a/src/ast/vtable.h ++++ b/src/ast/vtable.h +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + namespace bpftrace { + namespace ast { +-- +2.32.0 diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.13.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.13.0.bb index 83e4722..006ca21 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.13.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.13.0.bb @@ -10,6 +10,7 @@ DEPENDS += "bison-native \ bcc \ systemtap \ libcereal \ + libbpf \ " PV .= "+git${SRCREV}" @@ -17,8 +18,9 @@ RDEPENDS:${PN} += "bash python3 xz" SRC_URI = "git://github.com/iovisor/bpftrace;branch=master \ file://0001-support-clang-upto-version-13.patch \ + file://0002-ast-Add-missing-standard-header-includes.patch \ " -SRCREV = "18aa073ee86260878bc76227a5023171f6c29200" +SRCREV = "24e1ca2f55591d2d284e0e80b77a22efd790e942" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf