For gcc-4.5.0, the hardfloat method for ARM EABI has been implemented. It gives a higher performance on systems that have hardware FPU. On ARM EABI, the default float method is *SOFT*, thats why if we want to build a hardfloat toolchain on ARM EABI we need to pass --with-float=hard. I'll attach a patch On <gcc-4.5 if you use eabi and hardfloat, it will fail to configure. Would you like to keep it that way or filter it so it only passes that if gcc-4.5?
Created attachment 228297 [details, diff] toolchain.patch
Created attachment 228421 [details, diff] toolchainv2.patch solar says it would be better to add the check for the gcc version, so i've added it.
the proposed patch looks fine, although when indenting the second line, please use tabs to match the "if" part, but then use spaces to line it up with the [[ <tab>if [[ .... <tab><space><space><space>tc_version_........ the confgcc= line is indented one too many times also, the style is '<space>;<space>then' fixes those issues and feel free to commit this change
Created attachment 228535 [details, diff] toolchainv3.patch Commited, i'm attaching the definitive patch for convenience
Mike, Something came to my mind, if a system is using *-unknown-*, this option will be enabled. This would break all systems since a softfp system can't be converted to hard. Do you mind if i change it to: if [[ ${CTARGET##*-} == *eabi ]] && [[ ${CTARGET//_/-} == *-hardfloat-* ]] && \ ? Thanks Also, is it fine if i add a case for *-softfp-*, where --with-float=softfp would be used? So we would have three: -softfloat -softfp (instead of unknown which is currently used in the arm stages where a FPU is required) -hardfloat (after 4.5) Thanks
if people want softfloat, then they should use a softfloat tuple. but that's me. if we're going to add a hardfloat magic chost, then checking should be unified just like the existing tc-is-softfloat. then the logic can be split out from arm so that it applies to all targets
Okay, Looking at toolchain-funcs.eclass, i can see this at the tc-is-softfloat function: <snip> # 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 <snip> tc-is-softfloat() { case ${CTARGET} in bfin*|h8300*) echo "only" ;; *) [[ ${CTARGET//_/-} == *-softfloat-* ]] \ && echo "yes" \ || echo "no" ;; esac } The definition of 'no' should be changed, am i right? I'll put an attachment to add a new function for hardfloat
Created attachment 228655 [details, diff] toolchain-funcs.patch Does this look right? Thanks
looks fine to me, thanks
Ok, applied, regarding toolchain.eclass(i'm not posting a patch since its a one-liner): @@ -1347,6 +1353,7 @@ [[ $(tc-is-softfloat) == "yes" ]] && confgcc="${confgcc} --with-float=soft" + [[ $(tc-is-hardfloat) == "yes" ]] && confgcc="${confgcc} --with-float=hard" # Native Language Support if use nls ; then Is that fine? Thanks
yes, that's fine, thanks
Applied. Closing.