commit:     4618bed8161e7e28c6704726cee0aebdf5f17109
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 14 12:46:13 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 12:47:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4618bed8

toolchain.eclass: don't try to enable offloading for non-linux

--enable-offload-defaulted doesn't work with x86_64-w64-mingw32 and
gets confused by plugin support not being available. Just disable it
for non-Linux.

Closes: https://bugs.gentoo.org/946397
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index d72047e891d1..c59f1246459f 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1635,8 +1635,9 @@ toolchain_src_configure() {
        [[ ${CTARGET} == *-darwin* ]] && \
                confgcc+=( --enable-version-specific-runtime-libs )
 
+       # Linux specifically here for bug #946397.
        # TODO: amdgcn-amdhsa?
-       [[ ${CTARGET} == x86_64* ]] && confgcc+=(
+       [[ ${CTARGET} == x86_64*-*-linux-* ]] && confgcc+=(
                --enable-offload-defaulted
                --enable-offload-targets=nvptx-none
        )

Reply via email to