From 20caeaec04410f2470ea6ed2bd6aac14ed09ee9c Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 5 Oct 2021 17:33:38 +0200 Subject: sys-libs/libomp: Add flags & deps for deviceRTLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/816270 Signed-off-by: Michał Górny --- sys-libs/libomp/libomp-13.0.0.9999.ebuild | 20 ++++++++++++++++---- sys-libs/libomp/libomp-13.0.0.ebuild | 20 ++++++++++++++++---- sys-libs/libomp/libomp-14.0.0.9999.ebuild | 20 ++++++++++++++++---- 3 files changed, 48 insertions(+), 12 deletions(-) (limited to 'sys-libs') 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 -- cgit v1.2.3-65-gdbad