[U-Boot] [RFC][PATCH] ARMV7: Patch to fix hard float build issues

Måns Rullgård mans at mansr.com
Sat Feb 19 14:25:43 CET 2011


Alexander Holler <holler at ahsoftware.de> writes:

> Hello,
>
> Am 19.02.2011 12:19, schrieb Måns Rullgård:
>
>>> In no case, however, should -msoft-float be *removed*: that would make
>>> float support in U-Boot implicit and dependent on the toolchain in use,
>>> and I think U-Boot float support should always be explicit and not
>>> depend on the toolchain.
>>
>> There is no reason for supporting hardware floating-point in u-boot.  If
>> floating-point is used at all, and I can't think of a place where it is,
>> it is not relevant to performance.  The added complexity of supporting a
>> hardware FPU is not worth it, in my opinion.
>
> I still don't understand this discussion. Floats aren't used in u-boot, 
> so why should it make a difference if -msoft-float will be removed? I 
> know there was one bug which linked in something wrong from glibc, but 
> if that flag isn't needed than it shouldn't make a difference at all if 
> -msoft-float or -mhard-float is used.

The linker refuses to combine objects with different calling
conventions, and those tags are set based only on compiler flags, not
what code the file actually contains.

Some version of u-boot with some versions of gcc erroneously pull in
something from libgcc, which will fail if libgcc and u-boot used
different ABI flags.

The real error here is that of linking in libgcc in the first place, not
the ABI flags.

> So whats the reasoning to use -msoft-float as it is currently done? To 
> confuse people? ;)

I guess it's there to make sure no floating-point instructions make it
into u-boot, even though floats are not used in the code.  Perhaps
someone was paranoid.

-- 
Måns Rullgård
mans at mansr.com



More information about the U-Boot mailing list