This is the mail archive of the gcc-patches@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]

-nodefaultlibs and -nostdlib override -{static,shared}-lib* (was: PATCH RFA: Add -static-libstdc++ option to g++)


* Ian Lance Taylor wrote on Sat, Jun 20, 2009 at 09:24:46AM CEST:
> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> > For tools like libtool it would be nice to know for certain that
> >   -nodefaultlibs -static-libstdc++
> >
> > (or -nostdlib) does not add libstdc++ to the link.

> I think that is the desired semantics: -nodefaultlibs and -nostdlib
> override -static-libstdc++, not vice-versa.

Thank you.  OK to commit? (Tested make info pdf html.)

Cheers,
Ralf

2009-06-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/invoke.texi (Link Options): -nodefaultlibs and -nostdlib
	override library linkage flags such as -static-libgcc or
	-shared-libgcc.

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5df3513..dccad0b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -8127,7 +8127,9 @@ or @option{-nodefaultlibs} is used.
 @item -nodefaultlibs
 @opindex nodefaultlibs
 Do not use the standard system libraries when linking.
-Only the libraries you specify will be passed to the linker.
+Only the libraries you specify will be passed to the linker, options
+specifying linkage of the system libraries, such as @code{-static-libgcc}
+or @code{-shared-libgcc}, will be ignored.
 The standard startup files are used normally, unless @option{-nostartfiles}
 is used.  The compiler may generate calls to @code{memcmp},
 @code{memset}, @code{memcpy} and @code{memmove}.
@@ -8139,7 +8141,9 @@ mechanism when this option is specified.
 @opindex nostdlib
 Do not use the standard system startup files or libraries when linking.
 No startup files and only the libraries you specify will be passed to
-the linker.  The compiler may generate calls to @code{memcmp}, @code{memset},
+the linker, options specifying linkage of the system libraries, such as
+@code{-static-libgcc} or @code{-shared-libgcc}, will be ignored.
+The compiler may generate calls to @code{memcmp}, @code{memset},
 @code{memcpy} and @code{memmove}.
 These entries are usually resolved by entries in
 libc.  These entry points should be supplied through some other


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