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: Thu, 27 Sep 2018 22:26:45
Message-Id: 1538087192.03138227aa0985a708bbb9ecf331baf06f75d5df.slyfox@gentoo
1 commit: 03138227aa0985a708bbb9ecf331baf06f75d5df
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 27 21:45:03 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 27 22:26:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03138227
7
8 toolchain-funcs.eclass: softfloat detection, bug #666896
9
10 commit 921cb9c10de4d237924a61a1c27f914dfb479a64
11 "toolchain-funcs.eclass: Update tc-is-softfloat for new ARM tuples"
12 changed autodetection of mst 'arm*' targets from from 'no'
13 to 'yes'.
14
15 It is incorrect at least for bare-metal targets that tend
16 to pass their taget defaults.
17
18 Bug #666896 is one example example command:
19 # crossdev -s1 \
20 --env 'EXTRA_ECONF="--with-multilib-list=rmprofile"' \
21 arm-none-eabi
22
23 rmprofile one of special cases for gcc as it explicitky does
24 not myx with any arch-specific options and --with-float=soft
25 breaks it:
26
27 Error: You cannot use any of --with-arch/cpu/fpu/float/mode
28 with --with-multilib-list=rmprofile
29
30 The immediate fix is to restore initial autodetection for bare-metal
31 targets.
32
33 Reported-by: Eugene Bright
34 Closes: https://bugs.gentoo.org/666896
35 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
36
37 eclass/toolchain-funcs.eclass | 7 +++++++
38 1 file changed, 7 insertions(+)
39
40 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
41 index 3fa32820151..12ed132c48f 100644
42 --- a/eclass/toolchain-funcs.eclass
43 +++ b/eclass/toolchain-funcs.eclass
44 @@ -231,6 +231,10 @@ tc-detect-is-softfloat() {
45 [[ $(tc-getTARGET_CPP) == "gcc -E" ]] && return 1
46
47 case ${CTARGET:-${CHOST}} in
48 + # Avoid autodetection for bare-metal targets. bug #666896
49 + *-newlib|*-elf|*-eabi)
50 + return 1 ;;
51 +
52 # arm-unknown-linux-gnueabi is ambiguous. We used to treat it as
53 # hardfloat but we now treat it as softfloat like most everyone
54 # else. Check existing toolchains to respect existing systems.
55 @@ -269,6 +273,9 @@ tc-tuple-is-softfloat() {
56 echo "softfp" ;;
57 arm*-hardfloat-*|arm*eabihf)
58 echo "no" ;;
59 + # bare-metal targets have their defaults. bug #666896
60 + *-newlib|*-elf|*-eabi)
61 + echo "no" ;;
62 arm*)
63 echo "yes" ;;
64 *)