Compile using static libstdc++?

Neil Bird neil.bird@uk.thalesgroup.com
Wed Jul 4 08:14:00 GMT 2001


  Although I've compiled up gcc3 with the dynamic libstdc++.so
(as I want), I would like the default link behaviour to be the
'old' method of using the libstdc++.a.

  I should be able to do this by surrounding the -lstdc++ with
-Bstatic & -Bdynamic (I think), and I'm hoping to put that in
the specs unless the user's explictly specified '-shared'
("%{!shared:...}").


  Um. But I can't figure out how! The closest I've found is the
'%o' in the link_command spec.


  Is there a more correct way of doing this (obviously, I don't
wish to force a fully-static link; I only wish for the C++ exe.
to be able to run without visibility of libstdc++.so).

  This probably applies to libgcc_s.so as well ...

-- 
=================- http://www.thalesgroup.com/ -================
  Neil Bird   Principal Engineer                  |
       work - mailto:neil.bird@uk.thalesgroup.com | $> cd /pub
   personal - mailto:neil@fnxweb.com              | $> more beer



More information about the Gcc-help mailing list