[U-Boot-Users] Where can I find a libgcc.a with software FP.

Marius Groeger mgroeger at sysgo.com
Tue Feb 24 16:36:55 CET 2004


On Tue, 24 Feb 2004, Bernieshu wrote:

> Where can I find a suitable u-boot compiler for ixp425?
> I once downloaded cross-compiler from
> ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain, and
> www.snapgear.com.  They complain the similar issue as following.  Mainly
> it is the libgcc.a did not support software FP. Can anybody give some
> info on this?
>
> arm-linux-ld: ERROR:
> /usr/local/lib/gcc-lib/arm-linux/3.3.2/be/libgcc.a(_udivsi3.o) uses
> hardware FP, whereas u-boot uses software FP
> File in wrong format: failed to merge target specific data of file
> /usr/local/lib/gcc-lib/arm-linux/3.3.2/be/libgcc.a(_udivsi3.o)

This is a problem with the gcc/binutils toochain, which doesn't handle
-msoft-float the way we want it. The error you're seeing isn't really
one, since neither the U-Boot code nor the quoted functions in
libgcc.a actually use FP instructions. It's only the ELF binary tags
that don't match.

If you remove the -msoft-float argument from U-Boot's Makefiles (that
is, from the config.mk's) it should work. However, should your code
ever generate floating point commands, there will be no compile error.
U-Boot will simply crash in run-time, as there is no FP emulation
handler running. I don't know to what extent this can happen, say, due
to the compiler's optimisation attempts.

There are a number of patches for gcc 3.x floating around, which add
proper -msoft-float to gcc. But since they also break binary
compatibily (everything must be compiled anew) and seem to apply only
for PXA, I'm not convinced those patches are really helpful.

Regards,
Marius

-- 
Marius Groeger <mgroeger at sysgo.com>
Project Manager

SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
Am Pfaffenstein 14
55270 Klein-Winternheim, Germany

Voice: +49-6136-9948-0 | FAX: +49-6136-9948-10
www.sysgo.com | www.elinos.com | www.osek.de




More information about the U-Boot mailing list