summaryrefslogtreecommitdiffstats
path: root/dynamic-layers
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-08-06 20:23:05 -0700
committerKhem Raj <raj.khem@gmail.com>2021-08-06 20:30:38 -0700
commiteb92914e31ff872c032155997c42ca8b6e6d82a3 (patch)
treee3894485f32d98b598aa59132c2f97d03206636b /dynamic-layers
parent0516983c48d6aad32a133f73d308125edd146f1c (diff)
downloadmeta-clang-eb92914e31ff872c032155997c42ca8b6e6d82a3.tar.gz
bpftrace: Update to master
Fix build with libc++ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'dynamic-layers')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-support-clang-upto-version-13.patch11
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0002-ast-Add-missing-standard-header-includes.patch49
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.13.0.bb4
3 files changed, 57 insertions, 7 deletions
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 @@
1From 4cffb745dabde63f6f9c67a95265f5fc670dc1d7 Mon Sep 17 00:00:00 2001 1From 7b2f02a7b7d246b24cf029b3a75d8595b7b3c250 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 5 Aug 2021 22:15:27 -0700 3Date: Thu, 5 Aug 2021 22:15:27 -0700
4Subject: [PATCH] support clang upto version 13 4Subject: [PATCH 1/2] support clang upto version 13
5 5
6Upstream-Status: Pending 6Upstream-Status: Submitted [https://github.com/iovisor/bpftrace/pull/1962]
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- 8---
9 CMakeLists.txt | 2 +- 9 CMakeLists.txt | 2 +-
@@ -16,12 +16,11 @@ index 86daa195..73744207 100644
16@@ -162,7 +162,7 @@ else() 16@@ -162,7 +162,7 @@ else()
17 find_package(LLVM REQUIRED) 17 find_package(LLVM REQUIRED)
18 endif() 18 endif()
19 19
20- if((${LLVM_VERSION_MAJOR} VERSION_LESS 6) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 12)) 20- if((${LLVM_VERSION_MAJOR} VERSION_LESS 6) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 12))
21+ if((${LLVM_VERSION_MAJOR} VERSION_LESS 6) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 13)) 21+ if((${LLVM_VERSION_MAJOR} VERSION_LESS 6) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 13))
22 message(SEND_ERROR "Unsupported LLVM version found: ${LLVM_INCLUDE_DIRS}") 22 message(SEND_ERROR "Unsupported LLVM version found: ${LLVM_INCLUDE_DIRS}")
23 message(SEND_ERROR "Specify an LLVM major version using LLVM_REQUESTED_VERSION=<major version>") 23 message(SEND_ERROR "Specify an LLVM major version using LLVM_REQUESTED_VERSION=<major version>")
24 endif() 24 endif()
25-- 25--
262.32.0 262.32.0
27
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 @@
1From 891071a52e2d5e62634bd6cff249f0d7346e66fa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 6 Aug 2021 20:14:06 -0700
4Subject: [PATCH 2/2] ast: Add missing standard header includes
5
6This fixes build when using libc++ from clang 13
7Fixes
8src/bpforc.h:40:10: error: no template named 'unordered_map' in nam
9espace 'std'
10| std::unordered_map<std::string, std::tuple<uint8_t *, uintptr_t>>;
11
12src/ast/vtable.h:76:30: error: implicit instantiation of undefined
13template 'std::basic_string<char>'
14| throw std::runtime_error(std::string("Unknown node: ") + typeid(n).name());
15| ^
16
17Upstream-Status: Submitted [https://github.com/iovisor/bpftrace/pull/1962]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 src/ast/bpforc/bpforc.h | 1 +
21 src/ast/vtable.h | 1 +
22 2 files changed, 2 insertions(+)
23
24diff --git a/src/ast/bpforc/bpforc.h b/src/ast/bpforc/bpforc.h
25index de0ed0c0..1b929dfd 100644
26--- a/src/ast/bpforc/bpforc.h
27+++ b/src/ast/bpforc/bpforc.h
28@@ -23,6 +23,7 @@
29 #endif
30
31 #include <optional>
32+#include <unordered_map>
33
34 namespace bpftrace {
35
36diff --git a/src/ast/vtable.h b/src/ast/vtable.h
37index 49e0f512..b89e6979 100644
38--- a/src/ast/vtable.h
39+++ b/src/ast/vtable.h
40@@ -4,6 +4,7 @@
41 #include <typeindex>
42 #include <typeinfo>
43 #include <unordered_map>
44+#include <string>
45
46 namespace bpftrace {
47 namespace ast {
48--
492.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 \
10 bcc \ 10 bcc \
11 systemtap \ 11 systemtap \
12 libcereal \ 12 libcereal \
13 libbpf \
13 " 14 "
14 15
15PV .= "+git${SRCREV}" 16PV .= "+git${SRCREV}"
@@ -17,8 +18,9 @@ RDEPENDS:${PN} += "bash python3 xz"
17 18
18SRC_URI = "git://github.com/iovisor/bpftrace;branch=master \ 19SRC_URI = "git://github.com/iovisor/bpftrace;branch=master \
19 file://0001-support-clang-upto-version-13.patch \ 20 file://0001-support-clang-upto-version-13.patch \
21 file://0002-ast-Add-missing-standard-header-includes.patch \
20 " 22 "
21SRCREV = "18aa073ee86260878bc76227a5023171f6c29200" 23SRCREV = "24e1ca2f55591d2d284e0e80b77a22efd790e942"
22 24
23S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"
24 26