summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Porcel <armin76@gentoo.org>2010-04-22 18:28:11 +0000
committerRaúl Porcel <armin76@gentoo.org>2010-04-22 18:28:11 +0000
commit65262e6f192b97b2091a03236ce51286814b8ce5 (patch)
tree1374b76ef2b9c02116427e02f1877b7d63b4760a /eclass/toolchain-funcs.eclass
parentDrop epatch_user, already executed by base eclass. Thx to sedzimir. (diff)
downloadhistorical-65262e6f192b97b2091a03236ce51286814b8ce5.tar.gz
historical-65262e6f192b97b2091a03236ce51286814b8ce5.tar.bz2
historical-65262e6f192b97b2091a03236ce51286814b8ce5.zip
Add tc-is-hardfloat function, rename 'no' of tc-is-softfloat to 'target doesn't support softfloat', acked by vapier, bug #315987
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r--eclass/toolchain-funcs.eclass17
1 files changed, 15 insertions, 2 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index e00a9c18b21e..8811c8b64ef8 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -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