From 65262e6f192b97b2091a03236ce51286814b8ce5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ra=C3=BAl=20Porcel?= Date: Thu, 22 Apr 2010 18:28:11 +0000 Subject: [PATCH] Add tc-is-hardfloat function, rename 'no' of tc-is-softfloat to 'target doesn't support softfloat', acked by vapier, bug #315987 --- eclass/toolchain-funcs.eclass | 17 +++++++++++++++-- 1 file 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 -- 2.26.2