libstdc++ libtool lossage
Alexandre Oliva
aoliva@redhat.com
Sat Feb 23 01:59:00 GMT 2002
On Feb 23, 2002, David Edelsohn <dje@watson.ibm.com> wrote:
> "gcc -shared" is suppose to create shared libraries and should
> only link with libgcc.so.
That's not so, and that's exactly what caused the problem in the first
place. Libtool has nothing to do with it. -shared implies
-shared-libgcc only for g++ and gcj, because then their libraries are
already linked with the shared libgcc, so not linking with the shared
libgcc would be asking for trouble. When using gcc, it won't link
with the shared libgcc unless explicitly told so. The problem was
that libstdc++-v3 and libjava did not use g++/gcj for linking, but
rather gcc, so they wouldn't be linked with the shared version of
libgcc. The fix was to add -shared-libgcc such that these libraries
would be linked with the shared version of libgcc.
> I respectfully submit that if libtool does not understand that,
> libtool should be fixed.
If this were the case, I'd agree to that. But libtool is only playing
by GCC's rules. If gcc -shared indeed linked with libgcc.so, so would
libtool. But it doesn't, so libtool doesn't either.
> "gcc -shared-libgcc -shared" is redundant and does not make sense.
Not true. Read the thread again, particularly RTH's and Jakub's
messages.
> "gcc -shared" was suppose to provide the semantics you are desiring.
I wish.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Gcc-patches
mailing list