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


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

	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
unusual case.

Thanks, David


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