This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-shared-libgcc vs. -static -static-libgcc
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: aoliva at redhat dot com, gcc at gcc dot gnu dot org
- Date: Mon, 25 Feb 2002 17:37:17 -0800
- Subject: -shared-libgcc vs. -static -static-libgcc
There is a small script that is constructed in the libstdc++-v3 build
dir called 'mkcheck'. This is a way for library maintainers to
actually check shared and static linkage, and to keep an eye on binary
sizes.
Within the last week, the -shared-libgcc addition to CXX killed this
script.
What is now CXX:
/mnt/hd/ahimsa/bld-x86-gcc/gcc/g++ -shared-libgcc
-B/mnt/hd/ahimsa/bld-x86-gcc/gcc/
plus
-static
gives:
/mnt/hd/ahimsa/H-x86-src/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
Odd, methinks, but whatever.
As it turns out, there is no way to flip CXX into a statically-linking
compiler now:
%COMP.sh "-shared-libgcc -static -static-libgcc" foo.cc
/mnt/hd/ahimsa/H-x86-src/bin/ld: cannot find -lgcc_s
I've been trying to stay out of the whole libtool discussion. This
behavior, however, it making me have second thoughts.
Any hints on how -shared-libgcc can be reversed further down on the
compile line?
-benjamin