This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: libgcc_s.so.0 on HP-UX
- From: Ian Lance Taylor <iant at google dot com>
- To: Leonardo <sombriks at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 30 Sep 2009 17:08:42 -0700
- Subject: Re: libgcc_s.so.0 on HP-UX
- References: <f3fe88410909301057i4395d773n79523d79b36319d8@mail.gmail.com> <f3fe88410909301103n345c7003vb472b37121a90391@mail.gmail.com>
Leonardo <sombriks@gmail.com> writes:
> is possible to compile using gcc but don't have dependencies on
> libgcc_s.so.0,libunwind.so.1 and so on?
Strictly speaking, yes, it is possible. A program which is simply
"int main() { }" will normally not need those libraries. On
GNU/Linux, when using sufficiently new versions of the linker, gcc
will use the --as-needed linker option so that the libraries are only
marked as required when they are, in fact, required.
However, gcc does require functions from those libraries for various
different purposes. If gcc generates code which needs those
libraries, then those libraries will be needed, and there is nothing
useful to be done about it.
Ian