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 21, 2002, Richard Henderson <> wrote:

> 	gcc -shared			# -lgcc
> 	gcc -shared -shared-libgcc	# -lgcc_s
> 	g++ -shared			# -lstdc++ -lgcc_s

There's something I dislike very much about this design.

Earlier, it was perfectly ok to use gcc to link multi-language
applications and shared libraries, as long as the appropriate
language-specific libraries were explicitly linked in.

Now, doing so is harmful, and one has to remember to use
-shared-libgcc in order to avoid the very problem that libstdc++-v3
and libjava have run into.

Since linking with -lgcc instead of -lgcc_s is an optimization (I
suppose), wouldn't it be reasonable to use the safe construct by
default (-lgcc_s), and the static libgcc only if explicitly requested

I understand this wouldn't give as much benefit for C applications as
intended, but it appears to me that it would help all packages that
build C++ shared libraries out there, especially those that use

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]