From: Mike Frysinger Date: Mon, 12 Feb 2007 05:01:09 +0000 (+0000) Subject: first run at tc-is-softfloat() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fe5add4f52da998889a70e52ca04fceed3beef88;p=gentoo.git first run at tc-is-softfloat() --- 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 # @@ -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.