This is the mail archive of the
mailing list for the GCC project.
Re: libstdc++ libtool lossage
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 21 Feb 2002 15:35:34 -0500
- Subject: Re: libstdc++ libtool lossage
>>>>> Alexandre Oliva writes:
Alexandre> On Feb 21, 2002, Richard Henderson <email@example.com> wrote:
>> gcc -shared # -lgcc
>> gcc -shared -shared-libgcc # -lgcc_s
>> g++ -shared # -lstdc++ -lgcc_s
Alexandre> There's something I dislike very much about this design.
Alexandre> Earlier, it was perfectly ok to use gcc to link multi-language
Alexandre> applications and shared libraries, as long as the appropriate
Alexandre> language-specific libraries were explicitly linked in.
Alexandre> Now, doing so is harmful, and one has to remember to use
Alexandre> -shared-libgcc in order to avoid the very problem that libstdc++-v3
Alexandre> and libjava have run into.
Alexandre> Since linking with -lgcc instead of -lgcc_s is an optimization (I
Alexandre> suppose), wouldn't it be reasonable to use the safe construct by
Alexandre> default (-lgcc_s), and the static libgcc only if explicitly requested
"gcc -shared" now only links with gcc_s (see
gcc.c:init_gcc_specs). Why do you think it links with static libgcc.a?
What does this have to do with recent binutils? -shared-libgcc actually
should be changed to only link with gcc_s.