From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1437954-garchives=archives.gentoo.org@lists.gentoo.org>
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))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 72657158094
	for <garchives@archives.gentoo.org>; Tue, 20 Sep 2022 11:04:52 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 86139E0AD1;
	Tue, 20 Sep 2022 11:04:51 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6FED1E0AD3
	for <gentoo-commits@lists.gentoo.org>; Tue, 20 Sep 2022 11:04:51 +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))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 05E783410DF
	for <gentoo-commits@lists.gentoo.org>; Tue, 20 Sep 2022 11:04:50 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 865065F2
	for <gentoo-commits@lists.gentoo.org>; Tue, 20 Sep 2022 11:04:47 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
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" <mgorny@gentoo.org>
Message-ID: <1663671692.74314f7e732ac5df35a665c237bac5d44f9c73a9.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-libs/libomp/Manifest sys-libs/libomp/libomp-15.0.1.ebuild
X-VCS-Directories: sys-libs/libomp/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 74314f7e732ac5df35a665c237bac5d44f9c73a9
X-VCS-Branch: master
Date: Tue, 20 Sep 2022 11:04:47 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: fc0e6c34-077f-4a20-8dda-d75d45f0c903
X-Archives-Hash: cb488757b944d2050fba70f242859a3f

commit:     74314f7e732ac5df35a665c237bac5d44f9c73a9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 20 06:44:16 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep 20 11:01:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74314f7e

sys-libs/libomp: Bump to 15.0.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/libomp/Manifest             |   2 +
 sys-libs/libomp/libomp-15.0.1.ebuild | 128 +++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+)

diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 764184dae66e..90b8f599a5c2 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -5,5 +5,7 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f
 DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
 DIST llvm-project-15.0.0.src.tar.xz 112062796 BLAKE2B 947917b6c75cbd8882133dc01f57013523274962371ac5ae4a22b010f8a7d5d31288c1d9847bf19ba919fa3110fe34a8ff937107fe19bd064ed87bf4d08d8a51 SHA512 e5aacbe7574dcec62017cc03c9fa2ee4cf075125a3d6c3975c38f06e91adcebb1ff92bcf40c6dd67db087813c60b15a04f1424c713d751199518b58025ce87fc
 DIST llvm-project-15.0.0.src.tar.xz.sig 438 BLAKE2B 8eb12c259f94d8f867a31dbe05128adc1f9cc7ec8bcbdbe1738d2fad461f5d214e674f080f7f29b639a7a75f9c5b56c0f959f538697d647b94b97dc56b036e5f SHA512 4096464a46e07575b7cff448ff8bbc38fe972505f366b744419a06339cf32b93266b0fae5390879859041ce6710e4b675ed3ea7561d6a817623d7ece0e969661
+DIST llvm-project-15.0.1.src.tar.xz 112068688 BLAKE2B 8fd6690445f7cbc8b47a7c1dd1f2c4fbc39f9a97f9d4a0015d466726454b090b0d1ff9b0d926eba7065e84782901687f74e6540a36dc6656a93f3c92c7bc7e06 SHA512 cef84bc173118a30db3ece5e5c6f874bf689c77afc40a4792fdcb7556555ac14a8e6de1dc811755405e5d162d63bc69abaecba30d220a42765160d69f0073fda
+DIST llvm-project-15.0.1.src.tar.xz.sig 438 BLAKE2B d8f634adab531bb19178fb27bc83b3a90c856e9402dd5af700f9af43813f68d20c21b9112dd95e9f6f10609ee51ed5aaf77edb96ca16fb93136b8aea432affd3 SHA512 cbf2570840d8dc12f6436c495a23cf9d439ee195755c01a6d1d5bcc20133599dc956dc43a0f5016698e3c9a960826f5f3c2840a73f993467e275856a67999fda
 DIST llvm-project-303526ef3aa211c1930be2885deae15eeeda3b18.tar.gz 167503164 BLAKE2B 143c72c58517b3e40ee74c1a0df47bfd0d0f9e71926bc8c39a007e674a08df95d0ffe05f523f97e4409b248349e13719cabbc7ac6938feebe702959e84a07243 SHA512 9aa5c86de6c6be1d26c085eb29ea283429e41330e937e5fdbd545bb3f5b996ac82cd6268701fcbbd202e89ee35f2b67e595fc595bb7383778e9ad5fd52ca10a0
 DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f

diff --git a/sys-libs/libomp/libomp-15.0.1.ebuild b/sys-libs/libomp/libomp-15.0.1.ebuild
new file mode 100644
index 000000000000..d991a46a2f38
--- /dev/null
+++ b/sys-libs/libomp/libomp-15.0.1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake-multilib linux-info llvm llvm.org python-any-r1
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
+IUSE="
+	debug hwloc offload ompt test
+	llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
+	offload? (
+		virtual/libelf:=[${MULTILIB_USEDEP}]
+		dev-libs/libffi:=[${MULTILIB_USEDEP}]
+		~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
+	)
+"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	dev-lang/perl
+	offload? (
+		llvm_targets_AMDGPU? ( sys-devel/clang )
+		llvm_targets_NVPTX? ( sys-devel/clang )
+		virtual/pkgconfig
+	)
+	test? (
+		$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+		sys-devel/clang
+	)
+"
+
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+llvm.org_set_globals
+
+python_check_deps() {
+	python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+kernel_pds_check() {
+	if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+		local CONFIG_CHECK="~!SCHED_PDS"
+		local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+		check_extra_config
+	fi
+}
+
+pkg_pretend() {
+	kernel_pds_check
+}
+
+pkg_setup() {
+	use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+	use test && python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	local libdir="$(get_libdir)"
+	local mycmakeargs=(
+		-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
+
+		-DLIBOMP_USE_HWLOC=$(usex hwloc)
+		-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+
+		-DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
+
+		# do not install libgomp.so & libiomp5.so aliases
+		-DLIBOMP_INSTALL_ALIASES=OFF
+		# disable unnecessary hack copying stuff back to srcdir
+		-DLIBOMP_COPY_EXPORTS=OFF
+	)
+
+	if use offload; then
+		if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+			mycmakeargs+=(
+				-DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+				-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+			)
+		else
+			mycmakeargs+=(
+				-DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+				-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+			)
+		fi
+	fi
+
+	use test && mycmakeargs+=(
+		# this project does not use standard LLVM cmake macros
+		-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+		-DOPENMP_LIT_ARGS="$(get_lit_flags)"
+
+		-DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
+		-DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
+	)
+	addpredict /dev/nvidiactl
+	cmake_src_configure
+}
+
+multilib_src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+
+	cmake_build check-libomp
+}