diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-02-12 05:01:09 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-02-12 05:01:09 +0000 |
commit | f8325113e9c381228810a6ee561819df92c7ad05 (patch) | |
tree | 30a07b37cc431d6361f8534def2f47b18b1b6c7e /eclass | |
parent | Restored ~ppc64, see bug #166450. (diff) | |
download | gentoo-2-f8325113e9c381228810a6ee561819df92c7ad05.tar.gz gentoo-2-f8325113e9c381228810a6ee561819df92c7ad05.tar.bz2 gentoo-2-f8325113e9c381228810a6ee561819df92c7ad05.zip |
first run at tc-is-softfloat()
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 1092b08bdafa..c2536abc569c 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.64 2007/01/07 11:39:08 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.65 2007/02/12 05:01:09 vapier Exp $ # # Author: Toolchain Ninjas <toolchain@gentoo.org> # @@ -91,6 +91,25 @@ tc-is-cross-compiler() { return $([[ ${CBUILD:-${CHOST}} != ${CHOST} ]]) } +# See if this toolchain is a softfloat based one. +# The possible return values: +# - only: the target is always softfloat (never had fpu) +# - yes: the target should support softfloat +# - no: the target should support hardfloat +# This allows us to react differently where packages accept +# softfloat flags in the case where support is optional, but +# rejects softfloat flags where the target always lacks an fpu. +tc-is-softfloat() { + case ${CTARGET} in + h8300*) + echo "only" ;; + *) + [[ ${CTARGET//_/-} == *-softfloat-* ]] \ + && echo "yes" \ + || echo "no" + ;; + esac +} # Parse information from CBUILD/CHOST/CTARGET rather than # use external variables from the profile. |