From 4d4bcc14d16dfcab91d9bdce6fb920ec95511da4 Mon Sep 17 00:00:00 2001 From: Holger Hoffstätte Date: Mon, 26 Sep 2022 10:51:49 +0200 Subject: dev-util/bpftrace: add fix to work properly with LLVM-15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/872842 Signed-off-by: Holger Hoffstätte Signed-off-by: Sam James --- dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild | 95 --------------------- dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild | 96 ++++++++++++++++++++++ .../files/bpftrace-0.15.0-llvm-15-pointers.patch | 30 +++++++ 3 files changed, 126 insertions(+), 95 deletions(-) delete mode 100644 dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild create mode 100644 dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild create mode 100644 dev-util/bpftrace/files/bpftrace-0.15.0-llvm-15-pointers.patch (limited to 'dev-util/bpftrace') diff --git a/dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild b/dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild deleted file mode 100644 index 566a14a29b4a..000000000000 --- a/dev-util/bpftrace/bpftrace-0.15.0-r1.ebuild +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright 2019-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LLVM_MAX_SLOT=15 - -inherit llvm linux-info cmake toolchain-funcs - -DESCRIPTION="High-level tracing language for eBPF" -HOMEPAGE="https://github.com/iovisor/bpftrace" -MY_PV="${PV//_/}" -SRC_URI=" - https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz - https://dev.gentoo.org/~chutzpah/dist/bpftrace/bpftrace-0.14.1-llvm14.patch.gz -" -S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="fuzzing test" -# lots of fixing needed -RESTRICT="test" - -RDEPEND=" - >=dev-libs/libbpf-0.8:= - =dev-util/bcc-0.13.0:= - dev-util/systemtap - +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(), -- cgit v1.2.3-65-gdbad