This is the mail archive of the gcc@gcc.gnu.org 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


>>>>> Alexandre Oliva writes:

Alexandre> On Feb 21, 2002, Richard Henderson <rth@redhat.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
Alexandre> so?

	"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.

Thanks, David


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