aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-25 19:17:07 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-06-25 19:17:07 +0000
commit96be7a11070fd121d25f14c8fcc206c98ed63942 (patch)
tree9df30fa0de0c0a4779b8bf43637a65d6ccac3e32 /gcc/doc
parent0dae2d924dac1c080e85b92b1f71031dc67f606a (diff)
downloadgcc-96be7a11070fd121d25f14c8fcc206c98ed63942.zip
gcc-96be7a11070fd121d25f14c8fcc206c98ed63942.tar.gz
gcc-96be7a11070fd121d25f14c8fcc206c98ed63942.tar.bz2
g++spec.c (SKIPOPT): define.
cp/: * g++spec.c (SKIPOPT): define. (lang_specific_driver): Handle -static-libstdc++. Only add LIBSTDCXX_STATIC if we add LIBSTDCXX. ./: * doc/invoke.texi (Option Summary): Mention -static-libstdc++. (Link Options): Document -static-libstdc++. From-SVN: r148951
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1078ce5..244441a 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -409,7 +409,8 @@ Objective-C and Objective-C++ Dialects}.
@xref{Link Options,,Options for Linking}.
@gccoptlist{@var{object-file-name} -l@var{library} @gol
-nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
--s -static -static-libgcc -shared -shared-libgcc -symbolic @gol
+-s -static -static-libgcc -static-libstdc++ -shared @gol
+-shared-libgcc -symbolic @gol
-T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol}}
@@ -8246,6 +8247,18 @@ for the languages used in the program, or using the option
@option{-shared-libgcc}, such that it is linked with the shared
@file{libgcc}.
+@item -static-libstdc++
+When the @command{g++} program is used to link a C++ program, it will
+normally automatically link against @option{libstdc++}. If
+@file{libstdc++} is available as a shared library, and the
+@option{-static} option is not used, then this will link against the
+shared version of @file{libstdc++}. That is normally fine. However, it
+is sometimes useful to freeze the version of @file{libstdc++} used by
+the program without going all the way to a fully static link. The
+@option{-static-libstdc++} option directs the @command{g++} driver to
+link @file{libstdc++} statically, without necessarily linking other
+libraries statically.
+
@item -symbolic
@opindex symbolic
Bind references to global symbols when building a shared object. Warn