From 2cfb62836bcd010f49e186bfa9679ea469e72b32 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 30 Nov 2024 02:05:12 +0000 Subject: [PATCH] toolchain.eclass: wire up nvptx more We need to handle nvptx* in CTARGET in a few more places so we propagate that we're using newlib (which is obviously right but also means we don't then fail when building libatomic b/c libg.a is missing). Bug: https://bugs.gentoo.org/945296 Signed-off-by: Sam James --- eclass/toolchain.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 13f3298fea909..bcc47ffb96355 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1311,6 +1311,7 @@ toolchain_src_configure() { confgcc+=( --enable-shared --disable-threads ) ;; nvptx*) + needed_libc=newlib # "LTO is not supported for this target" confgcc+=( --disable-lto ) ;; @@ -1389,7 +1390,7 @@ toolchain_src_configure() { # __cxa_atexit is "essential for fully standards-compliant handling of # destructors", but apparently requires glibc. case ${CTARGET} in - *-elf|*-eabi) + nvptx*|*-elf|*-eabi) confgcc+=( --with-newlib ) ;; *-musl*)