Add tc-is-hardfloat function, rename 'no' of tc-is-softfloat to 'target doesn't suppo...
authorRaúl Porcel <armin76@gentoo.org>
Thu, 22 Apr 2010 18:28:11 +0000 (18:28 +0000)
committerRaúl Porcel <armin76@gentoo.org>
Thu, 22 Apr 2010 18:28:11 +0000 (18:28 +0000)
eclass/toolchain-funcs.eclass

index e00a9c18b21ed9ea47b8d306bc00b1160e6e1d20..8811c8b64ef893c810e4cfbe7218f310b7ea6d8f 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.98 2010/03/15 23:51:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.99 2010/04/22 18:28:11 armin76 Exp $
 
 # @ECLASS: toolchain-funcs.eclass
 # @MAINTAINER:
@@ -150,7 +150,7 @@ tc-is-cross-compiler() {
 # 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
+#  - no:   the target doesn't support softfloat
 # @CODE
 # This allows us to react differently where packages accept
 # softfloat flags in the case where support is optional, but
@@ -167,6 +167,19 @@ tc-is-softfloat() {
        esac
 }
 
+# @FUNCTION: tc-is-hardfloat
+# @DESCRIPTION:
+# See if this toolchain is a hardfloat based one.
+# @CODE
+# The possible return values:
+#  - yes:  the target should support hardfloat
+#  - no:   the target doesn't support hardfloat
+tc-is-hardfloat() {
+       [[ ${CTARGET//_/-} == *-hardfloat-* ]] \
+               && echo "yes" \
+               || echo "no"
+}
+
 # @FUNCTION: tc-is-static-only
 # @DESCRIPTION:
 # Return shell true if the target does not support shared libs, shell false