summaryrefslogtreecommitdiff
path: root/sys-libs/libomp
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r--sys-libs/libomp/Manifest6
-rw-r--r--sys-libs/libomp/libomp-6.0.9999.ebuild28
-rw-r--r--sys-libs/libomp/libomp-9999.ebuild30
-rw-r--r--sys-libs/libomp/metadata.xml2
4 files changed, 52 insertions, 14 deletions
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 78014cc46ccf..50eae1a05670 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -15,6 +15,6 @@ EBUILD libomp-3.9.0.ebuild 1264 BLAKE2B d47970eb3edd24601f97770c326f9274849425ae
EBUILD libomp-3.9.1.ebuild 1326 BLAKE2B 4e1c5178e66a3d4371556bcb26fab5ea84e2bac1ce0abb127d68bbe09f4e735d6d8ed4404f19bb6d8cb4808a782a5b72c9425e4acd2fe2cc97ebc3372de1c72c SHA512 99afa3364dfe73c52792e1f0c4cc19c9beb1fdb28d7fd009a778c351f86fd1759a1c4bfcd46194890b51f227844c063fed53085d78c0b91351858ed517e42794
EBUILD libomp-4.0.1.ebuild 2413 BLAKE2B f0d72a3a85e94a5a92f6ce68dce9a27eef08ef1b10bf6c85b3dc1ac4e4a5831ab6d744e5606cd198a480c373ce67a392fa1f238081a3830de8c01368aecd4f89 SHA512 196bb81a32308109df8485bf5e2eb9a5c5658b069c8c168b193e01839e2b2cad2a147dc0e0af2efd6029784e3a8dc891d1487c17b0e94d73ea634e69a3173928
EBUILD libomp-5.0.1.ebuild 2248 BLAKE2B caa3e0f8bb68db828c06160e705d08379e975d589ca837a25cf762f1e05d55f4e53cce22c27c4457fd112bbe8d74ae521c4c6028ee81acacac53478fa147a783 SHA512 b8f9f43635539891b8de0ecaf8d016ed351e07de4cb03c9420a22741ce20a3a85528318f56c549eb46307bddaa7a4ce55a6d93b99050351d50ba424fa7309bd5
-EBUILD libomp-6.0.9999.ebuild 2425 BLAKE2B 89caec2f5f0e0110b310d3f2da1e0856bda2a4cf5933df589985808e35e437956d62842e22a5a4084da2f943ee040509ca680264a327a8e9eac5309a232d3be9 SHA512 e90f826e26aa8893d41a7a8d566e6fada64c3b2278a3b0f0b943c746f7f6f8e66690cb937811ecd7b7d4e9ac87dd6396ecdc4d91bd2935a59758ab4a376af3b4
-EBUILD libomp-9999.ebuild 2400 BLAKE2B 8cbcf18ff9b9fe8b92ad693282d31a93b54432978021cc6037c63584a050c11a44de385a283a31d0e5379f878eca7c8a24bfc77ca4e0fc4838ecb23263daa47a SHA512 c82f937b54b2b5f2543aa4f260bc5a632d8e5dc9683a05c2f027ffc91aeddbb1ae3f1b6583dc0ba9fe4c85661c01c1d55c32e830e3290711c21f3d11518a7ffc
-MISC metadata.xml 670 BLAKE2B e059d444954246af28f1e5fde5a5bcda4662965a09fbe77d852e27ee7017e1723937b693c4e057963b71e32b5492660965a15af60087c540dc1161dc1a349a38 SHA512 d4269bb7192e00feed26327bb2ac36db3b1c4f5d55417c22efb9a64fa5a006c17dd39459ecc305e8a9a3a954271ad10013fe5c9159a30ea609513aabddebf485
+EBUILD libomp-6.0.9999.ebuild 3038 BLAKE2B b06ad6a77f8a897990e4fef2308b00dc967e3e24966b6276b4ab123eea447b1123198738dd2d972288a99031c53f0e305ed9c81f03b616012d11066bcb95d893 SHA512 09675cb136081fbdb872108355162361fca313b222a282a35101e3d942c76927fc000378cf16fc74bd995825514b89fc08f5981d1db496c7c2c647d72063e2f3
+EBUILD libomp-9999.ebuild 3013 BLAKE2B 65ff4c97a543ce3d96bbc83424f331a08ac14ac3c61e7bb30a027cfeed7dd5af53b253b8dd13e329fe0ef418997f45fab7c0315c52cf343aca4007b3cf8f9aa3 SHA512 0c45cf214db76f69582800dedd2c7a26355f07edfe1fdb5fc71cfab1197e3e9261d16790e4b9096df7eae55fa0f6d3e87e2b1252ea1b5a56d5e6f1716c6a984b
+MISC metadata.xml 825 BLAKE2B 07802144018f2f74b0927b53a346f99cbc7e36dbf501bb8dfc786f8d549c10eb688afafb1759f13d4d56d10f1bcae67dfa86cc2047cc39a9655a09a22e9a4260 SHA512 de43d5be94a5ea1cdfd3ae747d55b50d5d6ee577743f55d006d585d2d5acd5b3100845486ac415685f07361cd9985bae9347fff9c65417d198c49a61b4f6ba5e
diff --git a/sys-libs/libomp/libomp-6.0.9999.ebuild b/sys-libs/libomp/libomp-6.0.9999.ebuild
index 5e156aca296c..fe232b72fc87 100644
--- a/sys-libs/libomp/libomp-6.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-6.0.9999.ebuild
@@ -24,19 +24,27 @@ EGIT_BRANCH="release_60"
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
SLOT="0"
KEYWORDS=""
-IUSE="hwloc ompt test"
+IUSE="cuda hwloc offload ompt test"
+# CUDA works only with the x86_64 ABI
+REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
-RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
+RDEPEND="
+ hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
+ offload? (
+ virtual/libelf:=[${MULTILIB_USEDEP}]
+ virtual/libffi:=[${MULTILIB_USEDEP}]
+ cuda? ( dev-util/nvidia-cuda-sdk:= )
+ )"
# 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}
dev-lang/perl
+ offload? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- sys-devel/llvm
>=sys-devel/clang-6
)"
@@ -69,14 +77,24 @@ multilib_src_configure() {
-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
)
+ use offload && mycmakeargs+=(
+ # this is non-fatal and libomp checks for CUDA conditionally
+ # to ABI, so we can just ignore passing the wrong value
+ # on non-amd64 ABIs
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ )
use test && mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv"
+ # this project does not use standard LLVM cmake macros
+ -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+ -DOPENMP_LIT_ARGS="-vv"
-DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
-DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild
index ad6d62ae7449..d215cbe36384 100644
--- a/sys-libs/libomp/libomp-9999.ebuild
+++ b/sys-libs/libomp/libomp-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -23,19 +23,27 @@ EGIT_REPO_URI="https://git.llvm.org/git/openmp.git
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
SLOT="0"
KEYWORDS=""
-IUSE="hwloc ompt test"
+IUSE="cuda hwloc offload ompt test"
+# CUDA works only with the x86_64 ABI
+REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
-RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
+RDEPEND="
+ hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
+ offload? (
+ virtual/libelf:=[${MULTILIB_USEDEP}]
+ virtual/libffi:=[${MULTILIB_USEDEP}]
+ cuda? ( dev-util/nvidia-cuda-sdk:= )
+ )"
# 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}
dev-lang/perl
+ offload? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- sys-devel/llvm
>=sys-devel/clang-6
)"
@@ -68,14 +76,24 @@ multilib_src_configure() {
-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
)
+ use offload && mycmakeargs+=(
+ # this is non-fatal and libomp checks for CUDA conditionally
+ # to ABI, so we can just ignore passing the wrong value
+ # on non-amd64 ABIs
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ )
use test && mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv"
+ # this project does not use standard LLVM cmake macros
+ -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+ -DOPENMP_LIT_ARGS="-vv"
-DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
-DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
index ca91e84fce57..58df765860eb 100644
--- a/sys-libs/libomp/metadata.xml
+++ b/sys-libs/libomp/metadata.xml
@@ -9,7 +9,9 @@
<email>llvm@gentoo.org</email>
</maintainer>
<use>
+ <flag name='cuda'>Build CUDA offloading plugin (only with USE=offload)</flag>
<flag name='hwloc'>Enable CPU affinity support via hwloc</flag>
+ <flag name='offload'>Support offloading OpenMP using libomptarget</flag>
<flag name='ompt'>Enable OpenMP Tools Interface support</flag>
</use>
<longdescription>The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself.</longdescription>