This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ libtool lossage
On Feb 21, 2002, Richard Henderson <rth@redhat.com> wrote:
> Because with recent binutils we have
Oh, I thought I had binutils mainline in the same build tree, but I
was mistaken. Oops.
> gcc -shared # -lgcc
> gcc -shared -shared-libgcc # -lgcc_s
> g++ -shared # -lstdc++ -lgcc_s
> When linking libstdc++ itself, of course, we can't use the last,
> so we have to link with gcc. But we do in fact need the shared
> libgcc, so we want to add -shared-libgcc.
So what we want to do is to add -shared-libgcc to CXX in
libstdc++-v3's and libjava's configure.in. I'll give it a try.
>> As in dropping static libraries from the dependency list when they
>> happen to contain PDC that can't be added to shared libraries? This
>> would be great!
> What in the world has this got to do with anything? If you can't
> add the code to the shared library, you didn't build the shared
> library, did you?
Depends. If you link the final program with the static library,
things will work just fine. Of course, libtool takes care of that
part, as long as you use libtool to link the final program, so it's
not really dishonest.
> ESPECIALLY since it's almost certainly a user error in the first place.
Disagreed. It's not always up to the user to choose how GCC (and
libstdc++-v3) is being installed. If g++ -shared would *always* fail
just because libstdc++-v3 was not installed as a shared library, I'd
call that a bug. We just disagree on the solution to the problem,
because we come from different perspectives. Libtool can mask the
problem perfectly well, as long as you use libtool for all your
linking. With g++ -shared, there's really nothing you can do other
than failing to link and blaming the installer or creating a dynamic
library containing PDC.
--
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