-shared-libgcc vs. -static -static-libgcc
Benjamin Kosnik
bkoz@redhat.com
Mon Feb 25 17:40:00 GMT 2002
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
More information about the Gcc
mailing list