This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ libtool lossage
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 23 Feb 2002 05:24:14 -0300
- Subject: Re: libstdc++ libtool lossage
- Organization: GCC Team, Red Hat
- References: <200202230548.AAA26882@makai.watson.ibm.com>
On Feb 23, 2002, David Edelsohn <dje@watson.ibm.com> wrote:
> The reason that "gcc -shared" did not link with the shared library
> on GNU/Linux is because config/linux.h defines
> #if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
> #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
> #endif
And that's precisely the intent of this flag. As RTH and Jakub
explained, GNU/Linux doesn't need to link C shared libraries with
libgcc_s.so, as long as a sufficiently recent version of binutils is
in use.
The problem was that libstdc++-v3 and libjava, that are not C shared
libraries, use gcc, not g++ nor gcj, to create their libraries,
otherwise they'd have to be linked against themselves. That's why
they have to use -shared-libgcc in addition to -shared.
> LINK_EH_SPEC affects whether "gcc -shared" links with -lgcc_s or
> libgcc.a.
As God intended :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer