package/bcc: bump version to 0.36.1

https://github.com/iovisor/bcc/blob/v0.36.1/debian/changelog

Added upstream commit to fix build with the upcoming bump of llvm to
22.1.0.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Bernd Kuhls
2026-03-10 08:09:23 +01:00
committed by Julien Olivain
parent b95b9ed076
commit 937f7289d9
4 changed files with 66 additions and 55 deletions

View File

@@ -1,53 +0,0 @@
From 051be0c987622683c75b335bda16b9b61fc67fa4 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: https://github.com/iovisor/bcc/commit/8c5c96ad3beeed2fa827017f451a952306826974
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
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
--
2.51.1

View File

@@ -0,0 +1,64 @@
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
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Upstream: https://github.com/iovisor/bcc/commit/4c7be1ec6ab74e973f8d18a9011fa349c3d9dd58
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
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 6f8387aaf017..1f706344724d 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();

View File

@@ -1,3 +1,3 @@
# locally calculated
sha256 66c588bf5dfcd557a9f14f7e21a7b4dfdfcc4a574fd4b9897037059f046a6558 bcc-v0.35.0-git4.tar.gz
sha256 ea8562246801c52a9c21c47076dae9ff1d3719bb86b96d7a6222b3724461f52c bcc-v0.36.1-git4.tar.gz
sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE.txt

View File

@@ -4,7 +4,7 @@
#
################################################################################
BCC_VERSION = v0.35.0
BCC_VERSION = v0.36.1
BCC_SITE = https://github.com/iovisor/bcc
BCC_SITE_METHOD = git
BCC_GIT_SUBMODULES = YES