From 03138227aa0985a708bbb9ecf331baf06f75d5df Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 27 Sep 2018 22:45:03 +0100 Subject: toolchain-funcs.eclass: softfloat detection, bug #666896 commit 921cb9c10de4d237924a61a1c27f914dfb479a64 "toolchain-funcs.eclass: Update tc-is-softfloat for new ARM tuples" changed autodetection of mst 'arm*' targets from from 'no' to 'yes'. It is incorrect at least for bare-metal targets that tend to pass their taget defaults. Bug #666896 is one example example command: # crossdev -s1 \ --env 'EXTRA_ECONF="--with-multilib-list=rmprofile"' \ arm-none-eabi rmprofile one of special cases for gcc as it explicitky does not myx with any arch-specific options and --with-float=soft breaks it: Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=rmprofile The immediate fix is to restore initial autodetection for bare-metal targets. Reported-by: Eugene Bright Closes: https://bugs.gentoo.org/666896 Signed-off-by: Sergei Trofimovich --- eclass/toolchain-funcs.eclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 3fa32820151c..12ed132c48f1 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -231,6 +231,10 @@ tc-detect-is-softfloat() { [[ $(tc-getTARGET_CPP) == "gcc -E" ]] && return 1 case ${CTARGET:-${CHOST}} in + # Avoid autodetection for bare-metal targets. bug #666896 + *-newlib|*-elf|*-eabi) + return 1 ;; + # arm-unknown-linux-gnueabi is ambiguous. We used to treat it as # hardfloat but we now treat it as softfloat like most everyone # else. Check existing toolchains to respect existing systems. @@ -269,6 +273,9 @@ tc-tuple-is-softfloat() { echo "softfp" ;; arm*-hardfloat-*|arm*eabihf) echo "no" ;; + # bare-metal targets have their defaults. bug #666896 + *-newlib|*-elf|*-eabi) + echo "no" ;; arm*) echo "yes" ;; *) -- cgit v1.2.3-65-gdbad