arm-elf soft-float endian problem

Richard Earnshaw
Thu Jun 5 11:00:00 GMT 2003

> Hello,
> I am trying to build a xgcc toolchain for an arm-elf target.
> I am strugling with the endiannes of the software floating
> point library.
> It looks like the standard xgcc for the arm-elf target uses
> little endian byte order but big endian word order (1.0 =
> 0x0000F03F 0x00000000). This is compatible to the floating
> point format that the old ARM SDT 2.5 is using.
> The new ARM ADS 2.X uses now pure endian software floating
> point which means little endian word and byte order (1.0 =
> 0x00000000 0x0000F03F). I need to compile a compatible xgcc
> which uses this format to be able to link it with my rom
> library based on ADS 2.1 .
> I tried to patch /src/gcc-3.2.1/newlib/libc/include/machine/ieeefp.h
> but this didn't worked. Where can I select the endian format
> of the floating point library, or why did my patch fail ?

Most "Open Source" software hasn't caught up with this change yet and 
assumes that the traditional words-big-endian format for floating point 
applies at all times.  GCC-3.2 can't support pure-endian doubles (3.3 can, 
but it's not available yet as a compile-time option).  Even if you address 
this, there are probably other places where you will encounter problems.

You might find it easier to tell ADS to build your ROM image with the old 
format floats.  I think the option is something like "-fpu softfpa".


PS.  Be warned that even if you fix this issue there are other problems 
that you are likely to encounter.  GCC and ADS do not share a compatible 
ABI.  They are superficially similar, but differ in many dark corners.

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list