| 1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.98 2010/03/15 23:51:14 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.99 2010/04/22 18:28:11 armin76 Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: toolchain-funcs.eclass |
5 | # @ECLASS: toolchain-funcs.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Toolchain Ninjas <toolchain@gentoo.org> |
7 | # Toolchain Ninjas <toolchain@gentoo.org> |
| 8 | # @BLURB: functions to query common info about the toolchain |
8 | # @BLURB: functions to query common info about the toolchain |
| … | |
… | |
| 148 | # See if this toolchain is a softfloat based one. |
148 | # See if this toolchain is a softfloat based one. |
| 149 | # @CODE |
149 | # @CODE |
| 150 | # The possible return values: |
150 | # The possible return values: |
| 151 | # - only: the target is always softfloat (never had fpu) |
151 | # - only: the target is always softfloat (never had fpu) |
| 152 | # - yes: the target should support softfloat |
152 | # - yes: the target should support softfloat |
| 153 | # - no: the target should support hardfloat |
153 | # - no: the target doesn't support softfloat |
| 154 | # @CODE |
154 | # @CODE |
| 155 | # This allows us to react differently where packages accept |
155 | # This allows us to react differently where packages accept |
| 156 | # softfloat flags in the case where support is optional, but |
156 | # softfloat flags in the case where support is optional, but |
| 157 | # rejects softfloat flags where the target always lacks an fpu. |
157 | # rejects softfloat flags where the target always lacks an fpu. |
| 158 | tc-is-softfloat() { |
158 | tc-is-softfloat() { |
| … | |
… | |
| 163 | [[ ${CTARGET//_/-} == *-softfloat-* ]] \ |
163 | [[ ${CTARGET//_/-} == *-softfloat-* ]] \ |
| 164 | && echo "yes" \ |
164 | && echo "yes" \ |
| 165 | || echo "no" |
165 | || echo "no" |
| 166 | ;; |
166 | ;; |
| 167 | esac |
167 | esac |
|
|
168 | } |
|
|
169 | |
|
|
170 | # @FUNCTION: tc-is-hardfloat |
|
|
171 | # @DESCRIPTION: |
|
|
172 | # See if this toolchain is a hardfloat based one. |
|
|
173 | # @CODE |
|
|
174 | # The possible return values: |
|
|
175 | # - yes: the target should support hardfloat |
|
|
176 | # - no: the target doesn't support hardfloat |
|
|
177 | tc-is-hardfloat() { |
|
|
178 | [[ ${CTARGET//_/-} == *-hardfloat-* ]] \ |
|
|
179 | && echo "yes" \ |
|
|
180 | || echo "no" |
| 168 | } |
181 | } |
| 169 | |
182 | |
| 170 | # @FUNCTION: tc-is-static-only |
183 | # @FUNCTION: tc-is-static-only |
| 171 | # @DESCRIPTION: |
184 | # @DESCRIPTION: |
| 172 | # Return shell true if the target does not support shared libs, shell false |
185 | # Return shell true if the target does not support shared libs, shell false |