This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Shared libstdc++ on AIX
- To: dje at watson dot ibm dot com (David Edelsohn)
- Subject: Re: Shared libstdc++ on AIX
- From: Zoltan Hidvegi <hzoli at austin dot ibm dot com>
- Date: Fri, 27 Jul 2001 21:06:46 -0500 (CDT)
- Cc: hzoli at austin dot ibm dot com, gcc at gcc dot gnu dot org
David Edelsohn wrote:
> If the library is built as a shared library, one can get the
> --disable-shared behavior by linking it non-shared (gcc -static which
> invokes AIX ld with -bnso). This makes it a user choice instead of
> limiting the options by choosing --disable-shared at build time.
> --disable-shared obtains the same effect but limits the users options and
> makes the library less like the functionality on other platforms. Where's
> the advantage?
-static links everything statically, like system libc, X libraries
etc., not only libgcc and libstdc++. Also the shared libstdc++.a
contains a single sharable object, and -static would include that in
full, while if you link with the static libstdc++ only the objects
needed would be included. The best would be to put both the shared
object and the individual .o files into libstdc++.a, or make
libstdc++.a static and libstdc++_s.a shared and provide a
-static-libstdc++ option, just like there is already a -static-libgcc
option.
Zoli