-msoft-float and i386-coff target xcompiler
meissner@cygnus.com
meissner@cygnus.com
Fri Sep 5 11:36:00 GMT 1997
| I am trying to get the -msoft-float option to work with my rtems-aware
| cross-compiler. ( Linux-586 -> i386-coff )
| Has anyone out there done this?
|
|
| I really don't know where to begin. Do I create libgcc1.a with the
| i386-coff compiler and use it? I've done that, and added the
| -msoft-float switch to CFLAGS but disassembled listings show that the
| system continues to emit hard floating point instructions. Naturally,
| the program halts on execution of such instructions.
|
| My configuration is :
|
| gcc-2.7.2 with cross-gcc patches
| newlib-1.7.0-posix ( rtems aware )
| binutils-2.6.0
What you need to do is have functions that emulate floating point be inserted
into libgcc.a. Many other gcc targets (like the mips and rs6000 for instance)
do this by compiling config/fp-bit.c for both single and double precision
values, and then make multilibs for with/without floating point. The x86
complicates this by having long double be a longer type than normal double.
Right now, there isn't code in the egcs tree to simulate 80 bit floating point
constants. I thought in the past either Joern Rennecke <amylaar@cygnus.com> or
Jeff Law <law@cygnus.com> were hacking on a version of fp-bit.c that supported
extended precision, but I don't see it in either egcs or the Cygnus devo trees.
One way to go forward, is to make -msoft-float set long doubles to be the same
as double.
More information about the Gcc
mailing list