Soft Float is not being reported

Dimitry Andric dimitry@andric.com
Thu Jun 24 20:45:00 GMT 2004


On 2004-06-24 at 22:05:39 Dave wrote:


>> > The real solution would be building gcc with multilib support, so it
>> > builds three separate versions (i.e. FPA hardfloat, FPA softfloat and
>> > VFP softfloat) of libgcc and the other runtimes, but I've never
>> > understood how to do this with glibc...  It doesn't seem to have
>> > multilib support.

> # /opt/crosstool/bin/arm-linux-objdump -p
> /opt/crosstool/arm-linux/lib/libc.so.6
> [...]
> private flags = 602: [APCS-32] [VFP float format] [software FP] [has entry
> point]

This is okay.


> #/opt/crosstool/bin/arm-linux-objdump -p
> /opt/crosstool/lib/gcc-lib/arm-linux/3.3.3/libgcc.a
> [...]
> _eprintf.oS:     file format elf32-bigarm
> private flags = 600: [APCS-32] [VFP float format] [software FP]
> _bb.oS:     file format elf32-bigarm

Fine too.


> # /opt/crosstool/bin/arm-linux-gcc -o float float.c
> # /opt/crosstool/bin/arm-linux-objdump -p float
> [...]
> private flags = 602: [APCS-32] [VFP float format] [software FP] [has entry
> point]

Idem.


> # /opt/crosstool/bin/arm-linux-gcc -o float float.c -msoft-float
> /opt/crosstool/bin/arm-linux-gcc -o float float.c -msoft-float
> /opt/crosstool/lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/bin/ld:
> ERROR: /tmp/ccYarrF0.o uses FPA instructions, whereas float does not
> /opt/crosstool/lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/bin/ld:
> failed to merge target specific data of file /tmp/ccYarrF0.o
> collect2: ld returned 1 exit status

This is because the -msoft-float flag to arm-linux-gcc now produces
software FPA objects, NOT software VFP (similarly, -mhard-float
generates hardware FPA format objects).  So the temporary float.o is
now softfpa format, while your glibc/libgcc etc use softvfp, which is
then refused by the linker.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 183 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20040624/34aeee3d/attachment.sig>


More information about the crossgcc mailing list