(link_command_spec): Accept -static but do nothing with it.
authorRichard Stallman <rms@gnu.org>
Wed, 29 Jul 1992 22:55:25 +0000 (22:55 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 29 Jul 1992 22:55:25 +0000 (22:55 +0000)
From-SVN: r1715

gcc/gcc.c

index 4efe9e230ef421a3959cab8c16e4df42bf0d5861..d2259411dd8c40f60d253fa1880d0784c83f5b14 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -550,17 +550,19 @@ static int n_default_compilers
 #ifdef LINK_LIBGCC_SPECIAL
 /* Have gcc do the search for libgcc.a.  */
 /* -u* was put back because both BSD and SysV seem to support it.  */
+/* %{static:} simply prevents an error message if the target machine
+   doesn't handle -static.  */
 static char *link_command_spec = "\
 %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
                        %{r} %{s} %{T*} %{t} %{u*} %{x} %{z}\
-                       %{!A:%{!nostdlib:%S}} \
+                       %{!A:%{!nostdlib:%S}} %{static:}\
                        %{L*} %o %{!nostdlib:libgcc.a%s %L libgcc.a%s %{!A:%E}}\n }}}}}";
 #else
 /* Use -L and have the linker do the search for -lgcc.  */
 static char *link_command_spec = "\
 %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
                        %{r} %{s} %{T*} %{t} %{u*} %{x} %{z}\
-                       %{!A:%{!nostdlib:%S}} \
+                       %{!A:%{!nostdlib:%S}} %{static:}\
                        %{L*} %D %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}";
 #endif