Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 29 Apr 2018 15:31:47
Message-Id: 1525015891.e4da4705a51d46236f3e9a0d2c850455b7d9772c.slyfox@gentoo
1 commit: e4da4705a51d46236f3e9a0d2c850455b7d9772c
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 29 15:26:25 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 29 15:31:31 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4da4705
7
8 eclass/toolchain.eclass: disable libstdcxx-time for bare metal
9
10 Historically Gentoo unconditionally sets --enable-libstdcxx-time=yes
11 to avoid --enable-libstdcxx-time=rt on linux targets, bug #411681
12
13 Unfortunately this conflicts with arm-none-eabi and other
14 bare-metal targets that don't provide enough plumbing
15 to support for POSIX timers.
16
17 This change ogerrides our default to --disable-libstdcxx-time
18 on *-elf and *-eabi targets.
19
20 Tested as:
21 $ crossdev --stage4 arm-none-eabi
22
23 Reported-by: scheer <AT> wsoptics.de
24 Reported-by: Thomas Schneider
25 Bug: https://bugs.gentoo.org/411681
26 Bug: https://bugs.gentoo.org/589672
27 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
28
29 eclass/toolchain.eclass | 9 ++++++++-
30 1 file changed, 8 insertions(+), 1 deletion(-)
31
32 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
33 index df76dc4feb8..c942a112c75 100644
34 --- a/eclass/toolchain.eclass
35 +++ b/eclass/toolchain.eclass
36 @@ -971,7 +971,14 @@ toolchain_src_configure() {
37 case ${CTARGET} in
38 *-linux) needed_libc=no-fucking-clue;;
39 *-dietlibc) needed_libc=dietlibc;;
40 - *-elf|*-eabi) needed_libc=newlib;;
41 + *-elf|*-eabi)
42 + needed_libc=newlib
43 + # Bare-metal targets don't have access to clock_gettime()
44 + # arm-none-eabi example: bug #589672
45 + # But we explicitly do --enable-libstdcxx-time above.
46 + # Undoing it here.
47 + confgcc+=( --disable-libstdcxx-time )
48 + ;;
49 *-freebsd*) needed_libc=freebsd-lib;;
50 *-gnu*) needed_libc=glibc;;
51 *-klibc) needed_libc=klibc;;