Notification time stamped 2022-09-30 21:04:07 UTC
From c8dcef71a366fa4a787af6fbf81c7e4a36e64d1c Mon Sep 17 00:00:00 2001
From: kenneth topp <toppk(a)bllue.org>
Date: Sep 26 2022 13:49:01 +0000
Subject: Enable workaround 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
Submitted upstream:
https://github.com/iovisor/bpftrace/pull/2367
---
diff --git a/0001-Workaround-OpaquePointers-for-LLVM-15.patch
b/0001-Workaround-OpaquePointers-for-LLVM-15.patch
new file mode 100644
index 0000000..a8bd291
--- /dev/null
+++ b/0001-Workaround-OpaquePointers-for-LLVM-15.patch
@@ -0,0 +1,29 @@
+From 07fa48a94ef6d6bb1f335de345de18fe9776ca57 Mon Sep 17 00:00:00 2001
+From: kenneth topp <toppk(a)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 d49883f7..00f0f172 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(),
+--
+2.37.3
+
diff --git a/bpftrace.spec b/bpftrace.spec
index ba74914..811eeee 100644
--- a/bpftrace.spec
+++ b/bpftrace.spec
@@ -1,11 +1,12 @@
Name: bpftrace
Version: 0.16.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: High-level tracing language for Linux eBPF
License: ASL 2.0
URL:
https://github.com/iovisor/bpftrace
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+Patch1: 0001-Workaround-OpaquePointers-for-LLVM-15.patch
# Arches will be included as upstream support is added and dependencies are
# satisfied in the respective arches
@@ -80,6 +81,9 @@ find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \
%changelog
+* Mon Sep 26 2022 Kenneth Topp <toppk(a)bllue.org> - 0.16.0-3
+- Enable workaround for non OpaquePointers on LLVM-15
+
* Mon Sep 19 2022 Pete Walter <pwalter(a)fedoraproject.org> - 0.16.0-2
- Rebuild for llvm 15
https://src.fedoraproject.org/rpms/bpftrace/c/c8dcef71a366fa4a787af6fbf81...