Commit 1a0a7539 by Alexandre Oliva Committed by Alexandre Oliva

gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here...

* gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here...
(LINK_COMMAND_SPEC): ... from here.
(init_gcc_specs): Duplicate it here too, omitting
shared_name in the second copy.
(init_spec): Test for duplicate
* config/i386/djgpp.h (LINK_COMMAND_SPEC): Remove `%L %G'.

From-SVN: r51639
parent efe52a82
2002-03-31 Alexandre Oliva <aoliva@redhat.com>
* gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here...
(LINK_COMMAND_SPEC): ... from here.
(init_gcc_specs): Duplicate it here too, omitting
shared_name in the second copy.
(init_spec): Test for duplicate
* config/i386/djgpp.h (LINK_COMMAND_SPEC): Remove `%L %G'.
2002-03-30 David S. Miller <davem@redhat.com> 2002-03-30 David S. Miller <davem@redhat.com>
* config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. * config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
......
/* Configuration for an i386 running MS-DOS with DJGPP. /* Configuration for an i386 running MS-DOS with DJGPP.
Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -106,7 +106,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -106,7 +106,7 @@ Boston, MA 02111-1307, USA. */
\t%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ \t%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
\t%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ \t%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
\t%{static:} %{L*} %D %o\ \t%{static:} %{L*} %D %o\
\t%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ \t%{!nostdlib:%{!nodefaultlibs:%G}}\
\t%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\ \t%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\
\t-Tdjgpp.djl %{T*}}}}}}}\n\ \t-Tdjgpp.djl %{T*}}}}}}}\n\
%{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}" %{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}"
......
...@@ -558,9 +558,9 @@ proper position among the other output files. */ ...@@ -558,9 +558,9 @@ proper position among the other output files. */
#ifndef LIBGCC_SPEC #ifndef LIBGCC_SPEC
#if defined(LINK_LIBGCC_SPECIAL) || defined(LINK_LIBGCC_SPECIAL_1) #if defined(LINK_LIBGCC_SPECIAL) || defined(LINK_LIBGCC_SPECIAL_1)
/* Have gcc do the search for libgcc.a. */ /* Have gcc do the search for libgcc.a. */
#define LIBGCC_SPEC "libgcc.a%s" #define LIBGCC_SPEC "libgcc.a%s %L libgcc.a%s"
#else #else
#define LIBGCC_SPEC "-lgcc" #define LIBGCC_SPEC "-lgcc %L -lgcc"
#endif #endif
#endif #endif
...@@ -620,7 +620,7 @@ proper position among the other output files. */ ...@@ -620,7 +620,7 @@ proper position among the other output files. */
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}\ %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}\
%{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
%{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%G}}\
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}" %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
#endif #endif
...@@ -1426,7 +1426,16 @@ init_gcc_specs (obstack, shared_name, static_name, eh_name) ...@@ -1426,7 +1426,16 @@ init_gcc_specs (obstack, shared_name, static_name, eh_name)
#else #else
shared_name, shared_name,
#endif #endif
"}}}", NULL); "}}} %L ",
"%{static|static-libgcc:", static_name, " ", eh_name,
"}%{!static:%{!static-libgcc:",
"%{!shared:%{!shared-libgcc:", static_name, " ",
eh_name, "}%{shared-libgcc:",
static_name, "}}",
#ifdef LINK_EH_SPEC
"%{shared:%{!shared-libgcc:", static_name, "}}",
#endif
"}}", NULL);
obstack_grow (obstack, buf, strlen (buf)); obstack_grow (obstack, buf, strlen (buf));
free (buf); free (buf);
...@@ -1507,7 +1516,7 @@ init_spec () ...@@ -1507,7 +1516,7 @@ init_spec ()
when given the proper command line arguments. */ when given the proper command line arguments. */
while (*p) while (*p)
{ {
if (in_sep && *p == '-' && strncmp (p, "-lgcc", 5) == 0) if (in_sep && *p == '-' && strncmp (p, "-lgcc %L -lgcc", 14) == 0)
{ {
init_gcc_specs (&obstack, init_gcc_specs (&obstack,
#ifdef NO_SHARED_LIBGCC_MULTILIB #ifdef NO_SHARED_LIBGCC_MULTILIB
...@@ -1518,10 +1527,11 @@ init_spec () ...@@ -1518,10 +1527,11 @@ init_spec ()
, ,
"-lgcc", "-lgcc",
"-lgcc_eh"); "-lgcc_eh");
p += 5; p += 14;
in_sep = 0; in_sep = 0;
} }
else if (in_sep && *p == 'l' && strncmp (p, "libgcc.a%s", 10) == 0) else if (in_sep && *p == 'l'
&& strncmp (p, "libgcc.a%s %L libgcc.a%s", 24) == 0)
{ {
/* Ug. We don't know shared library extensions. Hope that /* Ug. We don't know shared library extensions. Hope that
systems that use this form don't do shared libraries. */ systems that use this form don't do shared libraries. */
...@@ -1534,7 +1544,7 @@ init_spec () ...@@ -1534,7 +1544,7 @@ init_spec ()
, ,
"libgcc.a%s", "libgcc.a%s",
"libgcc_eh.a%s"); "libgcc_eh.a%s");
p += 10; p += 24;
in_sep = 0; in_sep = 0;
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment