summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger@applied-asynchrony.com>2022-09-26 10:51:49 +0200
committerSam James <sam@gentoo.org>2022-09-27 22:41:35 +0100
commit4d4bcc14d16dfcab91d9bdce6fb920ec95511da4 (patch)
tree213f276a2596aeeededb506c498e8544cc865d36
parentsys-block/open-iscsi: add 2.1.8 (diff)
downloadgentoo-4d4bcc14.tar.gz
gentoo-4d4bcc14.tar.bz2
gentoo-4d4bcc14.zip
dev-util/bpftrace: add fix to work properly with LLVM-15
Closes: https://bugs.gentoo.org/872842 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild (renamed from dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild)1
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.15.0-llvm-15-pointers.patch30
2 files changed, 31 insertions, 0 deletions
diff --git a/dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild b/dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild
index 566a14a29b4a..1095ed8e6fd3 100644
--- a/dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild
+++ b/dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild
@@ -54,6 +54,7 @@ PATCHES=(
"${FILESDIR}/bpftrace-0.11.4-old-kernels.patch"
"${FILESDIR}/bpftrace-0.15.0-bcc-025.patch"
"${FILESDIR}/bpftrace-0.15.0-binutils-2.39.patch"
+ "${FILESDIR}/bpftrace-0.15.0-llvm-15-pointers.patch"
)
pkg_pretend() {
diff --git a/dev-util/bpftrace/files/bpftrace-0.15.0-llvm-15-pointers.patch b/dev-util/bpftrace/files/bpftrace-0.15.0-llvm-15-pointers.patch
new file mode 100644
index 000000000000..51ea034b9a88
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.15.0-llvm-15-pointers.patch
@@ -0,0 +1,30 @@
+
+From: https://github.com/iovisor/bpftrace/pull/2367
+Bug: https://bugs.gentoo.org/872842
+
+From 07fa48a94ef6d6bb1f335de345de18fe9776ca57 Mon Sep 17 00:00:00 2001
+From: kenneth topp <toppk@bllue.org>
+Date: Mon, 26 Sep 2022 00:33:29 -0400
+Subject: [PATCH] Workaround OpaquePointers for LLVM 15
+
+This workaround allows bpftrace to be compiled against
+LLVM-15. This will have to be address properly before LLVM-16
+More details from LLVM here: https://llvm.org/docs/OpaquePointers.html
+---
+ src/ast/irbuilderbpf.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ast/irbuilderbpf.cpp b/src/ast/irbuilderbpf.cpp
+index d49883f786..00f0f172ff 100644
+--- a/src/ast/irbuilderbpf.cpp
++++ b/src/ast/irbuilderbpf.cpp
+@@ -123,6 +123,9 @@ IRBuilderBPF::IRBuilderBPF(LLVMContext &context,
+ module_(module),
+ bpftrace_(bpftrace)
+ {
++#if LLVM_VERSION_MAJOR == 15
++ context.setOpaquePointers(false);
++#endif
+ // Declare external LLVM function
+ FunctionType *pseudo_func_type = FunctionType::get(
+ getInt64Ty(),