This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with gcc-3.3.2 for ARM


Dan Kegel <dank@kegel.com> wrote:

> Aitor Garcia wrote:
> > What's the difference between arm-linux and arm-elf
> > targets ?. 
> > I think that arm-linux is to be used with glibc
> > libraries and arm-elf is to be used with newlib.
> > Is this correct ?.
> 
> Yes.

 There is one basical difference which is that Linux/ARM is
for only CPUs with a FPU (hard-float), the Linux kernel has
always a FPU-emulator, so everything will be compiled as
if there would be a FPU-unit.

 The situation is quite similar or worse with the 'i386' target:
Even the embedded 'i386-elf' target expects a '387' being
present, or being emulated, no support for '-msoft-float' as
is the case with other CPUs, in the FSF sources.  The
'-msoft-float' (with triggering the '-mno-fp-ret-in-387') can be
enabled though, but why every embedded i386EX, i486SX
etc. based system is assumed to have a '387/487SX'  is
still odd...

 Another difference of course between the '*-linux' and '*-elf'
targets is that Linux uses also shared libs when the embedded
targets use only statically linked executables.  A statically
linked Linux executable (against glibc) would be 10 or so times
bigger than an 'elf' executable (linked against newlib), all the
'i386-elf' and 'i386-linux' target toolchain owners are free to
check this... I checked the situation with the ARM using gcc-3.2.3
etc. :

/home1/kai/test/hello > arm-linux-gnu-size hi_arm-*.x
   text    data     bss     dec     hex filename
  11156    2292     228   13676    356c hi_arm-elf.x
 392448    3496    4340  400284   61b9c hi_arm-linux.x

A statically linked executable with a code size of 392+ kbytes
instead of 11+ kilobytes tells why glibc wouldn't very good in any
embedded work...

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]