summaryrefslogtreecommitdiff
path: root/sys-libs/libomp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-03 13:50:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-03 13:50:40 +0100
commita2c1a301b2ea85c230b30ef69ff667f230a1bf88 (patch)
tree72b20e59998ee19c32c86634c05e02790faaf20f /sys-libs/libomp
parent24d75f43d3d4caf76f2448bb277e89a3b3ae0d99 (diff)
gentoo auto-resync : 03:08:2022 - 13:50:40
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r--sys-libs/libomp/Manifest3
-rw-r--r--sys-libs/libomp/libomp-14.0.4.ebuild142
-rw-r--r--sys-libs/libomp/libomp-14.0.6.ebuild142
3 files changed, 287 insertions, 0 deletions
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 8e075dfd1e77..e7d9c3a3d346 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -3,7 +3,10 @@ DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
EBUILD libomp-13.0.1.ebuild 3836 BLAKE2B bfecc3ecb5928ba0c4f1e79baf7108705b33b654631ebc05a52bebab494eebefe6ec1f7403170f5e0b541942618a88ebad52f5ba80bf185a2544170df3c84bcc SHA512 97a257c4e40440c83dc72d76f67d5b4b49ea74b138e541163c3bc938a50052fae3ae988c60a290c1b0051efc623f9be464c1801b5b7569a8cbb446724fe8267b
+EBUILD libomp-14.0.4.ebuild 3823 BLAKE2B 4d60017e3f8b82fa5e45d4524039bafca2c81c859dcdfc25232e500e1b7e955b7eed3cd6dcd79a67da9182f0545b88af8d9426a95dc314122415a5bf8f94e2c3 SHA512 fd08853add3a0c7a38b5c5f7501d24f4a879f3a0aaf936df82c7a40a7235852b4998bb11fcf969bbebb3c849f5aa06179d23763cfcdb02b4609aa5ece0473770
EBUILD libomp-14.0.6-r1.ebuild 3846 BLAKE2B ba454ff21aa950024868546e76e34f7eae5e0df1e72f828832c7f32d4b5cb544d479b18e609adbfc2352e5773c9cc08717a0b09d6bcbf1c76020dc4911edd7e6 SHA512 6547e2e6c9847fa9dc0eee0717db07347764937f942db9a13f3e47615954fc3a15b7db1516f629c0e2036ee8367cba6aea7bd27c27d2a4b9b51922afc97e7ebb
+EBUILD libomp-14.0.6.ebuild 3828 BLAKE2B 0887d1ac8543821e06bb09a1c3b3331c7d727fc9101232893f19270a7bdc0092c9be0c85e5a9976450e7c131fff8918346515fbf880c700ebd113a5c399948a8 SHA512 d82f5e9129e7515cbf2d836519de4b7ddecc14ed9948584f3a49ea58d6dbd27a0b90a88d5329a9bc568e4063daf0c9ce8755c6c9ddcadad1a56a1f7142511721
EBUILD libomp-15.0.0.9999.ebuild 3250 BLAKE2B 93eb6805d0b96f8b9adb99c0b69b41a8b0f7e58c9aa3a8c8d58d98b265f0656b802638b3faf206f8603e7a591227eeb1853a97be6629c24b32c2f609369e3be5 SHA512 340e88828c233a54a03622db8cbfc468fc9a117665014cf5c431ae611e21bffe6286d3cd41478ae6425047ba9cb1f067498c19895b74dc432e93caf753874c70
MISC metadata.xml 908 BLAKE2B c200fb1c93ae8fbd3963b2b575586fbe8f6df2308a2babbe3da77c2cf59c3fa43f938849d47df2ef4acf381f247848c363a20cf33ad763be169764cbe43c4bb4 SHA512 3cde603a2de523c21fbf288d459d76c697f2291d3dc3dac47e70781a910b4d524442d3076d8541818f2d43c3c6477af75d5f0cb76c4fbe0b4567a11d67edb056
diff --git a/sys-libs/libomp/libomp-14.0.4.ebuild b/sys-libs/libomp/libomp-14.0.4.ebuild
new file mode 100644
index 000000000000..7df15f82e745
--- /dev/null
+++ b/sys-libs/libomp/libomp-14.0.4.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_ECLASS=cmake
+PYTHON_COMPAT=( python3_{8..10} )
+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="
+ cuda debug hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+RESTRICT="!test? ( test )"
+# CUDA works only with the x86_64 ABI
+REQUIRED_USE="
+ cuda? ( llvm_targets_NVPTX )
+ offload? ( cuda? ( abi_x86_64 ) )
+"
+
+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}]
+ cuda? ( dev-util/nvidia-cuda-toolkit:= )
+ )
+"
+# 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 llvm/include )
+llvm.org_set_globals
+
+python_check_deps() {
+ 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+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
+ # a cheap hack to force clang
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
+ # upstream defaults to looking for it in clang dir
+ # this fails when ccache is being used
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=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
+}
diff --git a/sys-libs/libomp/libomp-14.0.6.ebuild b/sys-libs/libomp/libomp-14.0.6.ebuild
new file mode 100644
index 000000000000..987d01113d97
--- /dev/null
+++ b/sys-libs/libomp/libomp-14.0.6.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_ECLASS=cmake
+PYTHON_COMPAT=( python3_{8..10} )
+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="
+ cuda debug hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+RESTRICT="!test? ( test )"
+# CUDA works only with the x86_64 ABI
+REQUIRED_USE="
+ cuda? ( llvm_targets_NVPTX )
+ offload? ( cuda? ( abi_x86_64 ) )
+"
+
+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}]
+ cuda? ( dev-util/nvidia-cuda-toolkit:= )
+ )
+"
+# 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 llvm/include )
+llvm.org_set_globals
+
+python_check_deps() {
+ 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+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
+ # a cheap hack to force clang
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
+ # upstream defaults to looking for it in clang dir
+ # this fails when ccache is being used
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=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
+}