summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-04-29 16:26:25 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-04-29 16:31:31 +0100
commite4da4705a51d46236f3e9a0d2c850455b7d9772c (patch)
tree559970f4994ec9d2be5714f0bcf9ad32ee24c745 /eclass/toolchain.eclass
parentmedia-gfx/sane-backends: arm stable wrt bug #653506 (diff)
downloadgentoo-e4da4705a51d46236f3e9a0d2c850455b7d9772c.tar.gz
gentoo-e4da4705a51d46236f3e9a0d2c850455b7d9772c.tar.bz2
gentoo-e4da4705a51d46236f3e9a0d2c850455b7d9772c.zip
eclass/toolchain.eclass: disable libstdcxx-time for bare metal
Historically Gentoo unconditionally sets --enable-libstdcxx-time=yes to avoid --enable-libstdcxx-time=rt on linux targets, bug #411681 Unfortunately this conflicts with arm-none-eabi and other bare-metal targets that don't provide enough plumbing to support for POSIX timers. This change ogerrides our default to --disable-libstdcxx-time on *-elf and *-eabi targets. Tested as: $ crossdev --stage4 arm-none-eabi Reported-by: scheer@wsoptics.de Reported-by: Thomas Schneider Bug: https://bugs.gentoo.org/411681 Bug: https://bugs.gentoo.org/589672 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index df76dc4feb8c..c942a112c755 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -971,7 +971,14 @@ toolchain_src_configure() {
case ${CTARGET} in
*-linux) needed_libc=no-fucking-clue;;
*-dietlibc) needed_libc=dietlibc;;
- *-elf|*-eabi) needed_libc=newlib;;
+ *-elf|*-eabi)
+ needed_libc=newlib
+ # Bare-metal targets don't have access to clock_gettime()
+ # arm-none-eabi example: bug #589672
+ # But we explicitly do --enable-libstdcxx-time above.
+ # Undoing it here.
+ confgcc+=( --disable-libstdcxx-time )
+ ;;
*-freebsd*) needed_libc=freebsd-lib;;
*-gnu*) needed_libc=glibc;;
*-klibc) needed_libc=klibc;;