This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Shared library that needs stuff from another library...
- To: Mark Crosland <mjc at c1000907-b dot sttls1 dot wa dot home dot com>
- Subject: Re: Shared library that needs stuff from another library...
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 08 Sep 1999 09:25:44 -0300
- Cc: gcc at gcc dot gnu dot org
- References: <Pine.LNX.4.10.9909071237320.4733-100000@c1000907-b.sttls1.wa.home.com>
On Sep 7, 1999, Mark Crosland <mjc@c1000907-b.sttls1.wa.home.com> wrote:
> Is there a way (link flag?) to build my shared lib against a statically
> built libstdc++, i.e., when I build my lib, the linker pulls in the stuff
> my lib needs from libstdc++.a?
Not portably. This works on some platforms (most notably those that
emit PIC by default, most notably alpha and mips), but on others you'd
have to compile all the object files of libstdc++.a with -fPIC, and on
others it just won't work. There is some work planned for GNU libtool
to support C++ (and, particularly, g++) and, at that point, it'll have
to deal with this mess. Meanwhile, you'll probably have to develop
platform-specific solutions.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them