commit:     c928da1854b76d608773485d2416fdc4663b3635
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 21 12:57:51 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Mar 21 15:05:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c928da18

sys-libs/libomp: Fix trying to access AMD GPUs

Prevent the CMake script from starting amdgpu-arch tool that accesses
the GPU in order to determine AMDGPU-based tests can be run.
We don't want the test suite to access the GPU, so just hard-disable
that.

Closes: https://bugs.gentoo.org/902449
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/libomp/libomp-16.0.0.9999.ebuild        | 2 ++
 sys-libs/libomp/libomp-16.0.0.ebuild             | 2 ++
 sys-libs/libomp/libomp-17.0.0.9999.ebuild        | 2 ++
 sys-libs/libomp/libomp-17.0.0_pre20230314.ebuild | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/sys-libs/libomp/libomp-16.0.0.9999.ebuild 
b/sys-libs/libomp/libomp-16.0.0.9999.ebuild
index 57c4ff3a33d0..d05b80a0e681 100644
--- a/sys-libs/libomp/libomp-16.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-16.0.0.9999.ebuild
@@ -113,6 +113,8 @@ multilib_src_configure() {
                -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

diff --git a/sys-libs/libomp/libomp-16.0.0.ebuild 
b/sys-libs/libomp/libomp-16.0.0.ebuild
index 0c6f7ee11238..72038b861daa 100644
--- a/sys-libs/libomp/libomp-16.0.0.ebuild
+++ b/sys-libs/libomp/libomp-16.0.0.ebuild
@@ -113,6 +113,8 @@ multilib_src_configure() {
                -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

diff --git a/sys-libs/libomp/libomp-17.0.0.9999.ebuild 
b/sys-libs/libomp/libomp-17.0.0.9999.ebuild
index 57c4ff3a33d0..d05b80a0e681 100644
--- a/sys-libs/libomp/libomp-17.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-17.0.0.9999.ebuild
@@ -113,6 +113,8 @@ multilib_src_configure() {
                -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

diff --git a/sys-libs/libomp/libomp-17.0.0_pre20230314.ebuild 
b/sys-libs/libomp/libomp-17.0.0_pre20230314.ebuild
index 57c4ff3a33d0..d05b80a0e681 100644
--- a/sys-libs/libomp/libomp-17.0.0_pre20230314.ebuild
+++ b/sys-libs/libomp/libomp-17.0.0_pre20230314.ebuild
@@ -113,6 +113,8 @@ multilib_src_configure() {
                -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

Reply via email to