summaryrefslogtreecommitdiff
path: root/sys-libs/libomp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-12 23:49:59 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-12 23:49:59 +0100
commit241157fae4eae88cefc48b4644bad8b9e53583dc (patch)
tree21c5bcbe695778c057090452592e3861a780352b /sys-libs/libomp
parent229d5601ae2eca4f143dabdfb36406376cf88c03 (diff)
gentoo auto-resync : 12:05:2023 - 23:49:59
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r--sys-libs/libomp/Manifest2
-rw-r--r--sys-libs/libomp/libomp-17.0.0_pre20230512.ebuild151
2 files changed, 153 insertions, 0 deletions
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 937663282b79..9123ab81450b 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -7,10 +7,12 @@ DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c
DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
+DIST llvm-project-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
EBUILD libomp-14.0.6-r1.ebuild 3917 BLAKE2B d92540af690dd622122ad1a4ed2548afa141f1254fbe9a9b3d34286b36f0fa70ccaf915f218c1bea8c68377ea20724db9443d365e2e5f290707f444d3ff47ca5 SHA512 433ae63716103af5aa493c7dbae43f10003cac95abaae579dcb61cba6390da4b9b3fc921e410ba899719bd170fa153a7b3d66c8776c37fd074066173c1fea160
EBUILD libomp-15.0.7-r2.ebuild 3474 BLAKE2B c75fddce61b7e8fe837b4c5bc1b7dacfbe4bc1572537dd7c44c23f894d05b104e8946d896b3b19d78de32a87d866d5911a0f3a8f81796469bba2753d051b2105 SHA512 7dc7c5fd7cd370acadfdf6e15ed09cde0798312ed3c72e770596aecb5817a4ec1477cc1092e3c159d1988bba4200808259705206f80d8fd0019fe07c34f4455d
EBUILD libomp-16.0.3.ebuild 3993 BLAKE2B 12ea9bf058a78f1a4439ee65528a592b0fed0a1234e3c318a748f9bf8e520763c7ffda28719f00abbb01fb1a77798f1094ed48fc344d1ea12999a0bbe60a8675 SHA512 b517da1c7c983f21969377852743b5015f6ea86ec078f330d100c8a5bc39de6ee0aa488a15f1702ea765a958ec9ea8903226d81a3ba154273cfa8a5e615cb3b5
EBUILD libomp-16.0.4.9999.ebuild 3920 BLAKE2B f128f041db9ab95beed986fad4fce1d70d30688dff973aa15a1ffb268f248ade667da316effe8de491d836bebc289a30a691910d1159c7a2563cbaad42f1bfbc SHA512 56a8a37f77c4690041fa9d274b3b52a5cc41588e02961b157f078adafe882bf66957d4d729037baf25f1257a0cb2af5f83e432c2d214234cf6942bf31eb7bd9d
EBUILD libomp-17.0.0.9999.ebuild 3921 BLAKE2B 2aa5aa2719a4f9a7f244cd92fb819d0fafc81d7f806d1b295c583159e0884c14c04bf1188d8c9e315c4cd2e1d3940311cd4e80f03e501958cd3b38e1c0567ab9 SHA512 c6f7bbf7296b24154a170c47044851c7331564af58cdca813ac13903535e49438c9165c8c811e72ad18e0a2db4e890f9dce163f6f07b0b1d60a473e455402b00
EBUILD libomp-17.0.0_pre20230502.ebuild 3921 BLAKE2B 2aa5aa2719a4f9a7f244cd92fb819d0fafc81d7f806d1b295c583159e0884c14c04bf1188d8c9e315c4cd2e1d3940311cd4e80f03e501958cd3b38e1c0567ab9 SHA512 c6f7bbf7296b24154a170c47044851c7331564af58cdca813ac13903535e49438c9165c8c811e72ad18e0a2db4e890f9dce163f6f07b0b1d60a473e455402b00
+EBUILD libomp-17.0.0_pre20230512.ebuild 3921 BLAKE2B 2aa5aa2719a4f9a7f244cd92fb819d0fafc81d7f806d1b295c583159e0884c14c04bf1188d8c9e315c4cd2e1d3940311cd4e80f03e501958cd3b38e1c0567ab9 SHA512 c6f7bbf7296b24154a170c47044851c7331564af58cdca813ac13903535e49438c9165c8c811e72ad18e0a2db4e890f9dce163f6f07b0b1d60a473e455402b00
MISC metadata.xml 963 BLAKE2B fdea4545db21492049061b85eaa7038965183e10aceae7c41daadc1ce10e7e1bcb2e86344659787ee244360b50b51c99e1a348d3acd2185dac80097541a00dd7 SHA512 c279f8e9c2463dc3f6e02856e520105d6f3321b633439bfe7409bfd6e7e43f1450053dc4f6663492caf7077caf3f4ab0f5cf0161631639e3aefa9ff985dc476f
diff --git a/sys-libs/libomp/libomp-17.0.0_pre20230512.ebuild b/sys-libs/libomp/libomp-17.0.0_pre20230512.ebuild
new file mode 100644
index 000000000000..0da07fface9a
--- /dev/null
+++ b/sys-libs/libomp/libomp-17.0.0_pre20230512.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=""
+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
+}