This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: libgcc_s.so.0 on HP-UX


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


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