This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ libtool lossage
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 23 Feb 2002 02:18:10 -0300
- Subject: Re: libstdc++ libtool lossage
- Organization: GCC Team, Red Hat
- References: <200202230500.AAA25670@makai.watson.ibm.com>
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