This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Solaris gcc 4.0.0 static linking of libgcc.a
> ok, it seems that it was my error, I recompile gcc-4.0-10012005 to verify
> the behaviour, but libgcc_s.so needs to be linked in any case. gcc-3.4
> works because I changed the specs file, but then I thougth it was due to
> the compiler flags, which wasn't the case.
OK, thanks for the clarification.
> But what I don't understand is why libgcc_s.so is needed. I have no
> exception handling in my souces, and furthermore I use -fno-exceptions. I
> understand that I should link libgcc_eh.so dynamically for exception
> handling. I did a nm on the resulting so, and there were no references to
> GCC_xx, only to SYSVABI_xx and SUNW_xx. What Information would you need for
> further investigation, or is it simple to say: On Solaris, libgcc_s.so is
> always linked to c++ programs?
Yes, by default the g++ driver uses -shared-libgcc. Pass -static-libgcc if
you want to use the static libgcc, at the cost of proper EH support.
--
Eric Botcazou