From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A379615A7D9 for ; Sun, 19 Mar 2023 17:34:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF80EE08EC; Sun, 19 Mar 2023 17:34:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8EFA4E08EC for ; Sun, 19 Mar 2023 17:34:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 64A9E3412DA for ; Sun, 19 Mar 2023 17:34:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D21EB8E5 for ; Sun, 19 Mar 2023 17:34:35 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1679247271.25470c4c3bcdad4ae67fbe3a65b21682fe0fe670.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bpftrace/files/, dev-util/bpftrace/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/bpftrace/bpftrace-0.17.0-r2.ebuild dev-util/bpftrace/bpftrace-0.17.0-r3.ebuild dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch X-VCS-Directories: dev-util/bpftrace/ dev-util/bpftrace/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 25470c4c3bcdad4ae67fbe3a65b21682fe0fe670 X-VCS-Branch: master Date: Sun, 19 Mar 2023 17:34:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a0e45b7b-f8d7-475b-b1d5-4524668820c5 X-Archives-Hash: c5bf000bb15a427fabaf5b83fd608f72 commit: 25470c4c3bcdad4ae67fbe3a65b21682fe0fe670 Author: Holger Hoffstätte applied-asynchrony com> AuthorDate: Sun Mar 19 12:40:51 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Mar 19 17:34:31 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25470c4c dev-util/bpftrace: fixes for llvm-16 Closes: https://bugs.gentoo.org/902135 Signed-off-by: Holger Hoffstätte applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/30234 Signed-off-by: Michał Górny gentoo.org> ...-0.17.0-r2.ebuild => bpftrace-0.17.0-r3.ebuild} | 2 + .../bpftrace/files/bpftrace-0.17.0-llvm-16.patch | 26 +++++++++++++ .../files/bpftrace-0.17.0-use-std-optional.patch | 44 ++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/dev-util/bpftrace/bpftrace-0.17.0-r2.ebuild b/dev-util/bpftrace/bpftrace-0.17.0-r3.ebuild similarity index 94% rename from dev-util/bpftrace/bpftrace-0.17.0-r2.ebuild rename to dev-util/bpftrace/bpftrace-0.17.0-r3.ebuild index f976f34e8416..161c441420f7 100644 --- a/dev-util/bpftrace/bpftrace-0.17.0-r2.ebuild +++ b/dev-util/bpftrace/bpftrace-0.17.0-r3.ebuild @@ -55,6 +55,8 @@ PATCHES=( "${FILESDIR}/bpftrace-0.17.0-install-libs.patch" "${FILESDIR}/bpftrace-0.15.0-dont-compress-man.patch" "${FILESDIR}/bpftrace-0.11.4-old-kernels.patch" + "${FILESDIR}/bpftrace-0.17.0-llvm-16.patch" + "${FILESDIR}/bpftrace-0.17.0-use-std-optional.patch" ) pkg_pretend() { diff --git a/dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch b/dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch new file mode 100644 index 000000000000..5d845c134bea --- /dev/null +++ b/dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch @@ -0,0 +1,26 @@ + +From: https://github.com/iovisor/bpftrace/pull/2528 + +From a91064d7fb26626d79719c2e2a13cc2acab9549a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 10 Mar 2023 00:08:27 -0800 +Subject: [PATCH] cmake: Raise max llvm major version to 16 + +Signed-off-by: Khem Raj +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0a7914f580d..341ac7e9c1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,7 +165,7 @@ else() + endif() + + set(MIN_LLVM_MAJOR 6) +- set(MAX_LLVM_MAJOR 15) ++ set(MAX_LLVM_MAJOR 16) + + if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR})) + message(SEND_ERROR "Unsupported LLVM version found via ${LLVM_INCLUDE_DIRS}: ${LLVM_VERSION_MAJOR}") diff --git a/dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch b/dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch new file mode 100644 index 000000000000..21b4b7e6c267 --- /dev/null +++ b/dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch @@ -0,0 +1,44 @@ + +From: https://github.com/iovisor/bpftrace/pull/2525 + +From a794397394aa836f776da17c8e08876a2f64d477 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 13 Mar 2023 21:30:27 -0700 +Subject: [PATCH] ast: Use std::optional in CodegenLLVM::CodegenLLVM call + +Fixes build with clang-16 + +src/ast/passes/codegen_llvm.cpp:63:53: error: use of undeclared identifier 'Optional'; did you mean 'std::optional'? + +Signed-off-by: Khem Raj +--- + src/ast/passes/codegen_llvm.cpp | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/src/ast/passes/codegen_llvm.cpp b/src/ast/passes/codegen_llvm.cpp +index 616ff89ddbc..fe440adf373 100644 +--- a/src/ast/passes/codegen_llvm.cpp ++++ b/src/ast/passes/codegen_llvm.cpp +@@ -56,11 +56,17 @@ CodegenLLVM::CodegenLLVM(Node *root, BPFtrace &bpftrace) + throw std::runtime_error( + "Could not find bpf llvm target, does your llvm support it?"); + +- target_machine_.reset(target->createTargetMachine(LLVMTargetTriple, +- "generic", +- "", +- TargetOptions(), +- Optional())); ++ target_machine_.reset( ++ target->createTargetMachine(LLVMTargetTriple, ++ "generic", ++ "", ++ TargetOptions(), ++#if LLVM_VERSION_MAJOR >= 16 ++ std::optional() ++#else ++ Optional() ++#endif ++ )); + target_machine_->setOptLevel(llvm::CodeGenOpt::Aggressive); + + module_->setTargetTriple(LLVMTargetTriple);