On Tue, 2004-11-02 at 13:33, Richard Earnshaw wrote:
On Tue, 2004-11-02 at 12:24, Joel Sherrill wrote:
Richard Earnshaw wrote:
On Tue, 2004-11-02 at 00:21, Joel Sherrill wrote:
Hi,
It looks like btween gcc 3.3.3 and 3.3.5, the file config/arm/t-arm-elf
was reworked. I am getting linking errors which indicate that the
default libc.a is hard-float.
The gcc documentation states that -mhard-float is the default for the
compiler and I only see these libc.a's
-mhard-float has *never* been the default for the arm-elf
configuration. In fact, AFAIK the only supported configuration of gcc
on ARM that still uses the FPA hard-float format is Linux.
I rather suspected this because I didn't recall any RTEMS user CPU model
I had ever looked at having hard float.
But the gcc documentation states that hard-float is ALWAYS the default:
The documentation is out of date. There is a time when that was correct
for all the (then) supported configurations, but it's now far from the
truth.
OK, so I understand (and from what I see in gcc-3.4.x's source code),
the default for the arm code generation now is soft-float?
However, gcc-3.4.x seems to miss to pass this on to the assembler:
Some experiments with an arm-rtems-gcc using this multilib setup:
MULTILIB_OPTIONS = marm/mthumb msoft-float/mhard-float
MULTILIB_DIRNAMES = arm thumb soft fpu
MULTILIB_EXCEPTIONS = *mthumb/*mhard-float*
MULTILIB_MATCHES = marm=mno-thumb
shows this:
1.
# arm-rtems4.7-gcc -v -msoft-float ...
...
/opt/rtems-4.7/arm-rtems4.7/bin/as --gdwarf2 -mfpu=softfpa ...
2.
# arm-rtems4.7-gcc -v -mhard-float ...
...
/opt/rtems-4.7/arm-rtems4.7/bin/as --gdwarf2 ...
3.
# arm-rtems4.7-gcc -v ...
...
/opt/rtems-4.7/arm-rtems4.7/bin/as --gdwarf2 ...
=> arm-elf/gcc misses to pass -mfpu=softfpa for the "compiler's
default".
I.e. IMO, the actual cause for our problems is an inconsistency between
the GCC's defaults and "as"'s default.
IMO, this can be regarded from two POVs:
a) either arm/GCC's ASM_SPECS should be changed to reflect GCC other
flags having been changed
b) or binutils's default has to be changed to "-mfpu=softfpa"
I am currently trying to implement a) into arm/rtems-elf.h for
gcc-3.4.x.