RTEMS 184.108.40.206 Available -- PowerPC/virtex feedback
ralf.corsepius at rtems.org
Sat Aug 11 00:52:50 CDT 2007
On Fri, 2007-08-10 at 13:15 -0400, Robert S. Grimes wrote:
> Joel Sherrill wrote:
> > Chris Caudle wrote:
> >> Everyone is scurrying around figuring out how to rebuild tools with soft
> >> float, but it looks like that should be the default already, and so far no
> >> one has presented any code which confirms that the exception was actually
> >> caused by using a floating point register.
> >> Shouldn't looking at the instructions to see if that is a feasible
> >> explanation be the first step?
> > Yes.
> Okay, I brought this all about - wow! - so I really feel I should be
> doing something here. Unfortunately, I'm not able to fully comprehend
> this whole conversation; I'm really not at all familiar with the inner
> workings of either gcc or newlib, and this is my first foray into the
> PowerPC world.
Let me try to elaborate:
* soft-float support in GCC is implemented inside of gcc as part of
GCC's internal library 'libgcc'
* When building GCC+newlib a set of corresponding libc+libm+libgcc is
* When building GCC+newlib multilib'ed, one set of libc+libm+libgcc is
being built per multilib-variant.
* When linking an application with GCC, depending upon the flags being
passed to GCC, GCC implicitly selects one multlib-variant, and links
against that (Think gcc choses -L...).
* When compiling a source file, GCC generates a *.o for a particular
# powerpc-rtems4.8-gcc -mcpu=405 -o hello.o -c hello.c
lets gcc produce a *.o using what ever "-mcpu=405" implies.
# powerpc-rtems4.8-gcc -mcpu=405 -v -o hello hello.c
/opt/rtems-4.8/lib/gcc/powerpc-rtems4.8/4.2.1/../../../../powerpc-rtems4.8/bin/as -m405 -many -V -Qy -o /tmp/ccc5D0Fk.o /tmp/cc4hWicI.s
GNU assembler version 2.17.90 (powerpc-rtems4.8) using BFD version (GNU
--eh-frame-hdr -V -Qy -dn -Bstatic -o
hello /opt/rtems-4.8/lib/gcc/powerpc-rtems4.8/4.2.1/../../../../powerpc-rtems4.8/lib/m403/crt0.o -L/opt/rtems-4.8/lib/gcc/powerpc-rtems4.8/4.2.1/m403 -L/opt/rtems-4.8/lib/gcc/powerpc-rtems4.8/4.2.1/../../../../powerpc-rtems4.8/lib/m403 -L/opt/rtems-4.8/lib/gcc/powerpc-rtems4.8/4.2.1 -L/opt/rtems-4.8/lib/gcc/powerpc-rtems4.8/4.2.1/../../../../powerpc-rtems4.8/lib /tmp/ccc5D0Fk.o -lgcc -lc -lgcc
Note how gcc links against the m403 multilib.
* Finally, yes, -mcpu=403 and -mcpu=405 already should be soft-float.
If these should cause FPU-instructions somewhere, this would be a bug
and needs to be investigated.
More information about the rtems-users