diff options
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 @@ | |||
1 | From 3a402d393a02cca4ccbf46e1c9eadb31e33d9753 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 14 Jun 2021 12:49:43 -0700 | ||
4 | Subject: [PATCH] Remove APInt/APSInt toString() std::string variants | ||
5 | |||
6 | clang 13+ has removed this in favour of a pair of llvm::toString | ||
7 | () helpers inside StringExtras.h to improve compile speed by avoiding | ||
8 | hits on <string> header | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/3488] | ||
11 | Signed-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 | |||
16 | diff --git a/src/cc/json_map_decl_visitor.cc b/src/cc/json_map_decl_visitor.cc | ||
17 | index 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 | -- | ||
41 | 2.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 | ||
27 | SRCREV = "b2a76fa63f19036fbc9b3a705fbfa6358992ae22" | 28 | SRCREV = "b2a76fa63f19036fbc9b3a705fbfa6358992ae22" |