commit:     8720263cf7e75d8fc264ba028a76f7236b09f067
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 16 08:57:59 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 16 08:58:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8720263c

sys-devel/clang: Disable CUDA target autodetection

CUDA target autodetection causes sandbox failures, and even if it did
not, it would cause the package to be set for build host's video card.
Force the CUDA package detection to fail, in order to disable that.

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

 sys-devel/clang/clang-12.0.0.9999.ebuild | 3 +++
 sys-devel/clang/clang-12.0.0.ebuild      | 3 +++
 sys-devel/clang/clang-13.0.0.9999.ebuild | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/sys-devel/clang/clang-12.0.0.9999.ebuild 
b/sys-devel/clang/clang-12.0.0.9999.ebuild
index f0164c6eaea..bd58b0be005 100644
--- a/sys-devel/clang/clang-12.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-12.0.0.9999.ebuild
@@ -258,6 +258,9 @@ multilib_src_configure() {
                # furthermore, it provides only syntax checking
                -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
 
+               # disable using CUDA to autodetect GPU, just build for all
+               -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+
                # override default stdlib and rtlib
                -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
                -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")

diff --git a/sys-devel/clang/clang-12.0.0.ebuild 
b/sys-devel/clang/clang-12.0.0.ebuild
index d983e2ed06f..5feec724ffc 100644
--- a/sys-devel/clang/clang-12.0.0.ebuild
+++ b/sys-devel/clang/clang-12.0.0.ebuild
@@ -258,6 +258,9 @@ multilib_src_configure() {
                # furthermore, it provides only syntax checking
                -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
 
+               # disable using CUDA to autodetect GPU, just build for all
+               -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+
                # override default stdlib and rtlib
                -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
                -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")

diff --git a/sys-devel/clang/clang-13.0.0.9999.ebuild 
b/sys-devel/clang/clang-13.0.0.9999.ebuild
index f0164c6eaea..bd58b0be005 100644
--- a/sys-devel/clang/clang-13.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-13.0.0.9999.ebuild
@@ -258,6 +258,9 @@ multilib_src_configure() {
                # furthermore, it provides only syntax checking
                -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
 
+               # disable using CUDA to autodetect GPU, just build for all
+               -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+
                # override default stdlib and rtlib
                -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
                -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")

Reply via email to