summaryrefslogtreecommitdiffstats
path: root/dynamic-layers
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-06-14 14:06:39 -0700
committerKhem Raj <raj.khem@gmail.com>2021-06-14 17:39:06 -0700
commit7980d949ceaa72e76ed02a335ec1f94459ee5e31 (patch)
tree06ff18a37663031ca2ea6ab227fdd5b44b8ce34f /dynamic-layers
parenta634685a39eff6b6e7649bbb6dd38bb71e738cf3 (diff)
downloadmeta-clang-7980d949ceaa72e76ed02a335ec1f94459ee5e31.tar.gz
bcc: Fix build with llvm >= 13
toString implementation has changed in LLVM Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'dynamic-layers')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Remove-APInt-APSInt-toString-std-string-variants.patch42
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb1
2 files changed, 43 insertions, 0 deletions
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
new file mode 100644
index 0000000..c41e2e2
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Remove-APInt-APSInt-toString-std-string-variants.patch
@@ -0,0 +1,42 @@
1From 3a402d393a02cca4ccbf46e1c9eadb31e33d9753 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 14 Jun 2021 12:49:43 -0700
4Subject: [PATCH] Remove APInt/APSInt toString() std::string variants
5
6clang 13+ has removed this in favour of a pair of llvm::toString
7() helpers inside StringExtras.h to improve compile speed by avoiding
8hits on <string> header
9
10Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/3488]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/cc/json_map_decl_visitor.cc | 5 +++++
14 1 file changed, 5 insertions(+)
15
16diff --git a/src/cc/json_map_decl_visitor.cc b/src/cc/json_map_decl_visitor.cc
17index eff4d067..53896199 100644
18--- a/src/cc/json_map_decl_visitor.cc
19+++ b/src/cc/json_map_decl_visitor.cc
20@@ -20,6 +20,7 @@
21 #include <clang/AST/ASTContext.h>
22 #include <clang/AST/RecordLayout.h>
23 #include <clang/AST/RecursiveASTVisitor.h>
24+#include <llvm/ADT/StringExtras.h>
25 #include "common.h"
26 #include "table_desc.h"
27
28@@ -79,7 +80,11 @@ void BMapDeclVisitor::genJSONForField(FieldDecl *F) {
29 result_ += "[";
30 TraverseDecl(F);
31 if (const ConstantArrayType *T = dyn_cast<ConstantArrayType>(F->getType()))
32+#if LLVM_MAJOR_VERSION >= 13
33+ result_ += ", [" + toString(T->getSize(), 10, false) + "]";
34+#else
35 result_ += ", [" + T->getSize().toString(10, false) + "]";
36+#endif
37 if (F->isBitField())
38 result_ += ", " + to_string(F->getBitWidthValue(C));
39 result_ += "], ";
40--
412.32.0
42
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
index 4352db4..325a6ee 100644
--- 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
@@ -22,6 +22,7 @@ SRC_URI = "gitsm://github.com/iovisor/bcc \
22 file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ 22 file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \
23 file://0001-tools-trace.py-Fix-failing-to-exit.patch \ 23 file://0001-tools-trace.py-Fix-failing-to-exit.patch \
24 file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ 24 file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \
25 file://0001-Remove-APInt-APSInt-toString-std-string-variants.patch \
25 " 26 "
26 27
27SRCREV = "b2a76fa63f19036fbc9b3a705fbfa6358992ae22" 28SRCREV = "b2a76fa63f19036fbc9b3a705fbfa6358992ae22"