This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]