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: Richard Henderson <rth at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Sat, 23 Feb 2002 20:51:17 -0500
- Subject: Re: libstdc++ libtool lossage
>>>>> Richard Henderson writes:
Richard> On Sat, Feb 23, 2002 at 11:29:28AM -0500, David Edelsohn wrote:
>> "gcc -shared -shared-libgcc" is redundant and wrong.
Richard> No it isn't. Why do you insist otherwise?
Because -shared should imply shared libgcc. One normally wants
libraries to be linked against other shared libraries so that there is
only one instance of the library in memory on systems that allow sharing
of text. If the dependent shared library (libstdc++, libjava, X Windows
libraries, etc.) use libgcc interfaces, they should use the shared libgcc
It sounds more like GNU/Linux has a loading and relocation
performance problem which you are trying to work around by omitting as
many shared library dependencies as you can avoid. That does not sound
like a good long-term design. Note that this is one area where AIX's
design is very clean and efficient, if you cared to research the topic.
>> If you need something special for your target, make a
>> target-specific change, e.g., override CXX_FOR_TARGET in top-level config
>> or some other target-dependent location.
Richard> No, what I'd like is for the X libraries to be linked
Richard> without libgcc.so. I'd like the gnome libraries to be
Richard> linked without libgcc.so.
Richard> How does changing gcc's top-level config affect that?
The current configuration does not link with libgcc.so when using
-shared if LINK_EH_SPEC is defined. That has not changed, either before
or after Alexandre's patch. My current understanding is that
CXX_FOR_TARGET was changed to add -shared-libgcc for certain directories
so that libstdc++ and libjava would explicitly be linked with libgcc.so.
If you must follow that course of action for GNU/Linux, the
recently installed fix, which modifies CXX_FOR_TARGET, affects all
targets, not just GNU/Linux. I am suggesting making the CXX_FOR_TARGET
modification target-dependent in top-level config directory.
I may be able to override CXX_FOR_TARGET for AIX to get back to
the original behavior, but the PT_GNU_EH_FRAME feature seems to be the