Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: matthew green <mrg@eterna.com.au>
From: Richard Earnshaw <rearnsha@arm.com>
List: tech-toolchain
Date: 06/12/2003 15:05:02
>
> Probably should be fixed, now that gcc3 builds a shared libgcc (see below).
>
>
> i know it has *something* to do with exception handling, but could
> someone please explain why we need to use libgcc_s for anything but
> c++ programs (and possible even there only those that need it?)
> programs linked against libgcc_s.so are from experience MUCH more
> likely to fail to run because it is missing than other random
> libraries... but when it's not needed for anything (what in the
> current system is broken with out it, for instance?) i think we
> should seriously consider avoiding it when possible.
To the best of my knowledge we don't (add libgcc_s) unless linking c++.
The specs entry from a gcc-3.3 build reads:
*libgcc:
%{!shared:%{!symbolic: %{static|static-libgcc:-lgcc
-lgcc_eh}%{!static:%{!static
-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M
-lgc
c}}%{shared:-lgcc_s%M}}}}}
the g++ command adds -shared-libgcc as a link argument, gcc itself does
not.
R.