This is the mail archive of the 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: libstdc++ libtool lossage

On Feb 23, 2002, David Edelsohn <> wrote:

> 	"gcc -shared" is suppose to create shared libraries and should
> only link with

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, 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

> "gcc -shared" was suppose to provide the semantics you are desiring.

I wish.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

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