commit:     9a29cb53ff089af66610afe24aaad0eecf1f310e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 14 10:02:47 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 14 10:31:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a29cb53

sys-libs/libomp: Bump to 16.0.6

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

 sys-libs/libomp/Manifest             |   2 +
 sys-libs/libomp/libomp-16.0.6.ebuild | 151 +++++++++++++++++++++++++++++++++++
 2 files changed, 153 insertions(+)

diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 2b074c5f037c..fa1441790217 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -7,4 +7,6 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B 
f3d277e2029157329e5be78b78
 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 
47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df
 SHA512 
fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
 DIST llvm-project-16.0.5.src.tar.xz 118000368 BLAKE2B 
9f84e6bab450dc8d6379771afbca5cddc6fbad6c9728726f7158f290ab87d464ff657e89e1c8fc3c474362cc865ff13c5d55ef758c848ea3e660d732cb2fdefa
 SHA512 
7008e7e9c8c2246fe98ba3f0c0fa91e41c88c4da427bf1cfdcce7ef57e5ea838efe7c58c523a7d1708e70d64a4338afe16d06fba2fc7ac5a6c19ca3d6ee41e99
 DIST llvm-project-16.0.5.src.tar.xz.sig 566 BLAKE2B 
4c96f294f350e0086f8504a54c3387308c60efb573c8def40aec45b1918d43e36c44bafb0823625b6cefa5d99b3aacd7823d6c92c7a64a737653d5b51839a924
 SHA512 
4550c7c6a1b6ea603d1499aba5aca746f3948a00e7567604f5e7dc3b215a34357bad382a7ebea1f6cd7952841cb75a0dfbe2c278a8c6fcb630a5035b3e16e869
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 
95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d
 SHA512 
89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 
2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a
 SHA512 
ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
 DIST llvm-project-62c0bdabfa32f6e32b17b45425b15309db340dfb.tar.gz 190948645 
BLAKE2B 
f41d8ea32e189ef4641e42628fb516e307c9a6fcf65af537eb9fc0d3186591b062c5e85c9e935511ef706f28c6994a774a4e3f36ff54d79aaac7b293a6168625
 SHA512 
55a4cbfec3a496c1918aa614e5bdee368e4d0b6641c946d8bf8b828ab4bf4d9b29dbe96401a172079d70f924f5e513428fe990c65b556a0a860802cb13f5e3a0

diff --git a/sys-libs/libomp/libomp-16.0.6.ebuild 
b/sys-libs/libomp/libomp-16.0.6.ebuild
new file mode 100644
index 000000000000..72038b861daa
--- /dev/null
+++ b/sys-libs/libomp/libomp-16.0.6.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org
+inherit python-single-r1 toolchain-funcs
+
+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/${LLVM_SOABI}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux 
~x64-macos"
+IUSE="
+       debug gdb-plugin hwloc offload ompt test
+       llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+REQUIRED_USE="
+       gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       gdb-plugin? ( ${PYTHON_DEPS} )
+       hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
+       offload? (
+               dev-libs/libffi:=[${MULTILIB_USEDEP}]
+               ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
+               llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+       )
+"
+# 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_DEPS}
+               $(python_gen_cond_dep '
+                       dev-python/lit[${PYTHON_USEDEP}]
+               ')
+               sys-devel/clang
+       )
+"
+
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+llvm.org_set_globals
+
+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=${LLVM_MAJOR} llvm_pkg_setup
+       if use gdb-plugin || use test; then
+               python-single-r1_pkg_setup
+       fi
+}
+
+multilib_src_configure() {
+       # LTO causes issues in other packages building, #870127
+       filter-lto
+
+       # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+       use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+       local build_omptarget=OFF
+       # upstream disallows building libomptarget when sizeof(void*) != 8
+       if use offload &&
+               "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+               <<-EOF &>/dev/null
+                       int test[sizeof(void *) == 8 ? 1 : -1];
+               EOF
+       then
+               build_omptarget=ON
+       fi
+
+       local libdir="$(get_libdir)"
+       local mycmakeargs=(
+               -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
+
+               -DLIBOMP_USE_HWLOC=$(usex hwloc)
+               -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
+               -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+
+               -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
+
+               # do not install libgomp.so & libiomp5.so aliases
+               -DLIBOMP_INSTALL_ALIASES=OFF
+               # disable unnecessary hack copying stuff back to srcdir
+               -DLIBOMP_COPY_EXPORTS=OFF
+               # prevent trying to access the GPU
+               -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
+       )
+
+       if [[ ${build_omptarget} == ON ]]; 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
+}

Reply via email to