mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
bcc: Upgrade to 0.36.1
* Drop upstreamed patches * Backport clang-22 fix * Disable git lfs Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
parent
28f7c9cf68
commit
c358831993
@ -1,50 +0,0 @@
|
|||||||
From 2e3997121af597f3a54d97505a38b7fdb9febae3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: yonghong-song <ys114321@gmail.com>
|
|
||||||
Date: Mon, 14 Jul 2025 20:21:59 -0700
|
|
||||||
Subject: [PATCH] Fix a build failure with clang21 (#5369)
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
The build error message:
|
|
||||||
src/cc/frontends/clang/loader.cc:400:73: error: no matching function for
|
|
||||||
call to ‘clang::TextDiagnosticPrinter::TextDiagnosticPrinter(
|
|
||||||
llvm::raw_fd_ostream&, clang::DiagnosticOptions*)’
|
|
||||||
400 | auto diag_client = new TextDiagnosticPrinter(llvm::errs(), &*diag_opts);
|
|
||||||
| ^
|
|
||||||
The llvm commit
|
|
||||||
https://github.com/llvm/llvm-project/pull/139584
|
|
||||||
caused the build failure.
|
|
||||||
|
|
||||||
Adjust the code properly and the error is fixed.
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://github.com/iovisor/bcc/commit/8c5c96ad3beeed2fa827017f451a952306826974]
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
---
|
|
||||||
src/cc/frontends/clang/loader.cc | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/cc/frontends/clang/loader.cc b/src/cc/frontends/clang/loader.cc
|
|
||||||
index 07dc9d6a..6f8387aa 100644
|
|
||||||
--- a/src/cc/frontends/clang/loader.cc
|
|
||||||
+++ b/src/cc/frontends/clang/loader.cc
|
|
||||||
@@ -396,11 +396,19 @@ int ClangLoader::do_compile(
|
|
||||||
flags_cstr_rem.end());
|
|
||||||
|
|
||||||
// set up the error reporting class
|
|
||||||
+#if LLVM_VERSION_MAJOR >= 21
|
|
||||||
+ DiagnosticOptions diag_opts;
|
|
||||||
+ auto diag_client = new TextDiagnosticPrinter(llvm::errs(), diag_opts);
|
|
||||||
+
|
|
||||||
+ IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
|
|
||||||
+ DiagnosticsEngine diags(DiagID, diag_opts, diag_client);
|
|
||||||
+#else
|
|
||||||
IntrusiveRefCntPtr<DiagnosticOptions> diag_opts(new DiagnosticOptions());
|
|
||||||
auto diag_client = new TextDiagnosticPrinter(llvm::errs(), &*diag_opts);
|
|
||||||
|
|
||||||
IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
|
|
||||||
DiagnosticsEngine diags(DiagID, &*diag_opts, diag_client);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
// set up the command line argument wrapper
|
|
||||||
|
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
From 4c7be1ec6ab74e973f8d18a9011fa349c3d9dd58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
|
||||||
|
Date: Mon, 2 Mar 2026 10:03:15 +0100
|
||||||
|
Subject: [PATCH] Fix build with LLVM-22
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
LLVM-22 changed the signatures of various createDiagnostics() calls [1].
|
||||||
|
Introduce a new version macro guard and adapt the code to the changed API.
|
||||||
|
|
||||||
|
Fixes #5483
|
||||||
|
|
||||||
|
[1] https://github.com/llvm/llvm-project/commit/30633f30894129919050f24fdd1f8f6bc46beae0
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/iovisor/bcc/commit/4c7be1ec6ab74e973f8d18a9011fa349c3d9dd58]
|
||||||
|
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
|
||||||
|
---
|
||||||
|
src/cc/frontends/clang/loader.cc | 15 ++++++++++++---
|
||||||
|
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cc/frontends/clang/loader.cc b/src/cc/frontends/clang/loader.cc
|
||||||
|
index 6f8387aa..1f706344 100644
|
||||||
|
--- a/src/cc/frontends/clang/loader.cc
|
||||||
|
+++ b/src/cc/frontends/clang/loader.cc
|
||||||
|
@@ -464,7 +464,10 @@ int ClangLoader::do_compile(
|
||||||
|
}
|
||||||
|
invocation0.getFrontendOpts().DisableFree = false;
|
||||||
|
|
||||||
|
-#if LLVM_VERSION_MAJOR >= 20
|
||||||
|
+#if LLVM_VERSION_MAJOR >= 22
|
||||||
|
+ compiler0.setVirtualFileSystem(llvm::vfs::getRealFileSystem());
|
||||||
|
+ compiler0.createDiagnostics(new IgnoringDiagConsumer());
|
||||||
|
+#elif LLVM_VERSION_MAJOR >= 20
|
||||||
|
compiler0.createDiagnostics(*llvm::vfs::getRealFileSystem(), new IgnoringDiagConsumer());
|
||||||
|
#else
|
||||||
|
compiler0.createDiagnostics(new IgnoringDiagConsumer());
|
||||||
|
@@ -487,7 +490,10 @@ int ClangLoader::do_compile(
|
||||||
|
add_main_input(invocation1, main_path, &*out_buf);
|
||||||
|
invocation1.getFrontendOpts().DisableFree = false;
|
||||||
|
|
||||||
|
-#if LLVM_VERSION_MAJOR >= 20
|
||||||
|
+#if LLVM_VERSION_MAJOR >= 22
|
||||||
|
+ compiler1.setVirtualFileSystem(llvm::vfs::getRealFileSystem());
|
||||||
|
+ compiler1.createDiagnostics();
|
||||||
|
+#elif LLVM_VERSION_MAJOR >= 20
|
||||||
|
compiler1.createDiagnostics(*llvm::vfs::getRealFileSystem());
|
||||||
|
#else
|
||||||
|
compiler1.createDiagnostics();
|
||||||
|
@@ -517,7 +523,10 @@ int ClangLoader::do_compile(
|
||||||
|
invocation2.getCodeGenOpts().setInlining(CodeGenOptions::NormalInlining);
|
||||||
|
// suppress warnings in the 2nd pass, but bail out on errors (our fault)
|
||||||
|
invocation2.getDiagnosticOpts().IgnoreWarnings = true;
|
||||||
|
-#if LLVM_VERSION_MAJOR >= 20
|
||||||
|
+#if LLVM_VERSION_MAJOR >= 22
|
||||||
|
+ compiler2.setVirtualFileSystem(llvm::vfs::getRealFileSystem());
|
||||||
|
+ compiler2.createDiagnostics();
|
||||||
|
+#elif LLVM_VERSION_MAJOR >= 20
|
||||||
|
compiler2.createDiagnostics(*llvm::vfs::getRealFileSystem());
|
||||||
|
#else
|
||||||
|
compiler2.createDiagnostics();
|
||||||
@ -1,16 +0,0 @@
|
|||||||
Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5355]
|
|
||||||
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
|
|
||||||
|
|
||||||
diff --git a/tests/python/test_tools_memleak.py b/tests/python/test_tools_memleak.py
|
|
||||||
--- a/tests/python/test_tools_memleak.py
|
|
||||||
+++ b/tests/python/test_tools_memleak.py
|
|
||||||
@@ -26,7 +26,7 @@
|
|
||||||
# Build the memory leaking application.
|
|
||||||
c_src = 'test_tools_memleak_leaker_app.c'
|
|
||||||
tmp_dir = tempfile.mkdtemp(prefix='bcc-test-memleak-')
|
|
||||||
- c_src_full = os.path.dirname(sys.argv[0]) + os.path.sep + c_src
|
|
||||||
+ c_src_full = os.path.abspath(os.path.dirname(sys.argv[0])) + os.path.sep + c_src
|
|
||||||
exec_dst = tmp_dir + os.path.sep + 'leaker_app'
|
|
||||||
|
|
||||||
if subprocess.call(['gcc', '-g', '-O0', '-o', exec_dst, c_src_full]) != 0:
|
|
||||||
|
|
||||||
@ -19,20 +19,19 @@ DEPENDS += "bison-native \
|
|||||||
RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz"
|
RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz"
|
||||||
RDEPENDS:${PN}-ptest = "kernel-devsrc packagegroup-core-buildessential cmake bash python3 python3-netaddr python3-pyroute2"
|
RDEPENDS:${PN}-ptest = "kernel-devsrc packagegroup-core-buildessential cmake bash python3 python3-netaddr python3-pyroute2"
|
||||||
|
|
||||||
SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https;tag=v${PV} \
|
SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https;lfs=0;tag=v${PV} \
|
||||||
file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \
|
file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \
|
||||||
file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \
|
file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \
|
||||||
file://0001-Fix-a-build-failure-with-clang21-5369.patch \
|
|
||||||
file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \
|
file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \
|
||||||
file://0002-Add-riscv-syscall-prefix-detection-in-C-API.patch \
|
file://0002-Add-riscv-syscall-prefix-detection-in-C-API.patch \
|
||||||
file://0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch \
|
file://0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch \
|
||||||
file://0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch \
|
file://0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch \
|
||||||
|
file://0001-Fix-build-with-LLVM-22.patch \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
file://ptest_wrapper.sh \
|
file://ptest_wrapper.sh \
|
||||||
file://fix_for_memleak.patch \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
SRCREV = "c31a1ca305f787ba53e001ead45ebf65233a32cf"
|
SRCREV = "b9f1b2ab025e3ac95b6aaa1cb20bf222a7b8804e"
|
||||||
|
|
||||||
PACKAGECONFIG ??= "examples"
|
PACKAGECONFIG ??= "examples"
|
||||||
PACKAGECONFIG:remove:libc-musl = "examples"
|
PACKAGECONFIG:remove:libc-musl = "examples"
|
||||||
Loading…
x
Reference in New Issue
Block a user