From 7ede72fcf21bb993d5dc74c181904d66bbe95c9d Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 29 Jul 1992 22:55:25 +0000 Subject: [PATCH] (link_command_spec): Accept -static but do nothing with it. From-SVN: r1715 --- gcc/gcc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index 4efe9e230ef..d2259411dd8 100644 --- 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 -- 2.30.2