summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-10-05 17:33:38 +0200
committerMichał Górny <mgorny@gentoo.org>2021-10-05 17:34:22 +0200
commit20caeaec04410f2470ea6ed2bd6aac14ed09ee9c (patch)
tree1f03307043423af162b5b1f93fb2cfad6988521b /sys-libs/libomp
parentsys-apps/openrc: 0.44.6 bump (diff)
downloadgentoo-20caeaec04410f2470ea6ed2bd6aac14ed09ee9c.tar.gz
gentoo-20caeaec04410f2470ea6ed2bd6aac14ed09ee9c.tar.bz2
gentoo-20caeaec04410f2470ea6ed2bd6aac14ed09ee9c.zip
sys-libs/libomp: Add flags & deps for deviceRTLs
Closes: https://bugs.gentoo.org/816270 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r--sys-libs/libomp/libomp-13.0.0.9999.ebuild20
-rw-r--r--sys-libs/libomp/libomp-13.0.0.ebuild20
-rw-r--r--sys-libs/libomp/libomp-14.0.0.9999.ebuild20
3 files changed, 48 insertions, 12 deletions
diff --git a/sys-libs/libomp/libomp-13.0.0.9999.ebuild b/sys-libs/libomp/libomp-13.0.0.9999.ebuild
index cce3a6bf584f..c16560830be1 100644
--- a/sys-libs/libomp/libomp-13.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-13.0.0.9999.ebuild
@@ -13,9 +13,12 @@ HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
KEYWORDS=""
-IUSE="cuda debug hwloc kernel_linux offload ompt test"
+IUSE="cuda debug hwloc kernel_linux offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX"
# CUDA works only with the x86_64 ABI
-REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
+REQUIRED_USE="
+ cuda? ( llvm_targets_NVPTX )
+ offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,10 +35,14 @@ RDEPEND="
# - sys-devel/clang provides the compiler to run tests
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/perl
- offload? ( virtual/pkgconfig )
+ 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-6
+ sys-devel/clang
)"
LLVM_COMPONENTS=( openmp llvm/include )
@@ -90,6 +97,11 @@ multilib_src_configure() {
# to ABI, so we can just ignore passing the wrong value
# on non-amd64 ABIs
-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")"
)
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
diff --git a/sys-libs/libomp/libomp-13.0.0.ebuild b/sys-libs/libomp/libomp-13.0.0.ebuild
index d40f733e6363..8771f7014c5b 100644
--- a/sys-libs/libomp/libomp-13.0.0.ebuild
+++ b/sys-libs/libomp/libomp-13.0.0.ebuild
@@ -13,9 +13,12 @@ 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 kernel_linux offload ompt test"
+IUSE="cuda debug hwloc kernel_linux offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX"
# CUDA works only with the x86_64 ABI
-REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
+REQUIRED_USE="
+ cuda? ( llvm_targets_NVPTX )
+ offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,10 +35,14 @@ RDEPEND="
# - sys-devel/clang provides the compiler to run tests
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/perl
- offload? ( virtual/pkgconfig )
+ 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-6
+ sys-devel/clang
)"
LLVM_COMPONENTS=( openmp llvm/include )
@@ -91,6 +98,11 @@ multilib_src_configure() {
# to ABI, so we can just ignore passing the wrong value
# on non-amd64 ABIs
-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")"
)
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
diff --git a/sys-libs/libomp/libomp-14.0.0.9999.ebuild b/sys-libs/libomp/libomp-14.0.0.9999.ebuild
index cce3a6bf584f..c16560830be1 100644
--- a/sys-libs/libomp/libomp-14.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-14.0.0.9999.ebuild
@@ -13,9 +13,12 @@ HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
KEYWORDS=""
-IUSE="cuda debug hwloc kernel_linux offload ompt test"
+IUSE="cuda debug hwloc kernel_linux offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX"
# CUDA works only with the x86_64 ABI
-REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
+REQUIRED_USE="
+ cuda? ( llvm_targets_NVPTX )
+ offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,10 +35,14 @@ RDEPEND="
# - sys-devel/clang provides the compiler to run tests
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/perl
- offload? ( virtual/pkgconfig )
+ 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-6
+ sys-devel/clang
)"
LLVM_COMPONENTS=( openmp llvm/include )
@@ -90,6 +97,11 @@ multilib_src_configure() {
# to ABI, so we can just ignore passing the wrong value
# on non-amd64 ABIs
-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")"
)
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros