* [Patch Darwin] tidy linkspecs.
@ 2010-07-20 16:22 IainS
2010-07-22 2:24 ` Mike Stump
0 siblings, 1 reply; 3+ messages in thread
From: IainS @ 2010-07-20 16:22 UTC (permalink / raw)
To: GCC Patches; +Cc: mrs
there is a certain amount of unwelcome duplication in the darwin
LINK_COMMAND_SPECs.
this splits the LINK_COMMAND_SPECs into two parts and only changes the
bit that's necessary for darwin >= 9
successful bootstraps on {powerpc*,i686}-apple-darwin9, i686-apple-
darwin8, x86_64-apple-darwin10.
OK for trunk?
Iain
gcc/
* config/darwin.h (LINK_COMMAND_SPEC): Split into...
(LINK_COMMAND_SPEC_A): New.
(DSYMUTIL): New.
(DSYMUTIL_SPEC): New.
* config/darwin9.h (LINK_COMMAND_SPEC): Remove.
(DSYMUTIL_SPEC): Update for darwin >= 9 requirements.
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 162327)
+++ gcc/config/darwin.h (working copy)
@@ -266,8 +266,9 @@ extern GTY(()) int darwin_ms_struct;
instead of LINK_COMMAND_SPEC. The command spec is better for
specifying the handling of options understood by generic Unix
linkers, and for positional arguments like libraries. */
-#define LINK_COMMAND_SPEC "\
-%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+
+#define LINK_COMMAND_SPEC_A \
+ "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker) %l %X %{d} %{s} %{t} %{Z} %{u*} \
%{A} %{e*} %{m} %{r} %{x} \
%{o*}%{!o:-o a.out} \
@@ -277,11 +278,17 @@ extern GTY(()) int darwin_ms_struct;
%{fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran:
libgomp.a%s; : -lgomp } } \
%{!nostdlib:%{!nodefaultlibs: %(link_ssp) %G %L }} \
- %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n\
-%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n"
+
+#define DSYMUTIL "dsymutil"
+
+#define DSYMUTIL_SPEC \
+ "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
- %{gdwarf-2:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!
o:a.out}}}}}}}}}}}}"
+ %{gdwarf-2:%{!gstabs*:%{!g0: " DSYMUTIL " %{o*:%*}%{!
o:a.out}}}}}}}}}}}}"
+#define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC
+
#ifdef TARGET_SYSTEM_ROOT
#define LINK_SYSROOT_SPEC \
"%{isysroot*:-syslibroot %*;:-syslibroot " TARGET_SYSTEM_ROOT "}"
Index: gcc/config/darwin9.h
===================================================================
--- gcc/config/darwin9.h (revision 162327)
+++ gcc/config/darwin9.h (working copy)
@@ -24,22 +24,11 @@ along with GCC; see the file COPYING3. If not see
#define DARWIN_PREFER_DWARF
/* Since DWARF2 is default, conditions for running dsymutil are
different. */
-#undef LINK_COMMAND_SPEC
-#define LINK_COMMAND_SPEC "\
-%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
- %(linker) %l %X %{d} %{s} %{t} %{Z} \
- %{A} %{e*} %{m} %{r} %{x} \
- %{o*}%{!o:-o a.out} \
- %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
- %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|
coverage:-lgcov} \
- %{flto} %{fwhopr} \
- %{fopenmp|ftree-parallelize-loops=*: \
- %{static|static-libgcc|static-libstdc++|static-libgfortran:
libgomp.a%s; : -lgomp } } \
- %{!nostdlib:%{!nodefaultlibs: %(link_ssp) %G %L }} \
- %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n\
-%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
- %{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
+#undef DSYMUTIL_SPEC
+#define DSYMUTIL_SPEC \
+ "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+ %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s: \
+ %{g*:%{!gstabs*:%{!g0: " DSYMUTIL " %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
/* libSystem contains unwind information for signal frames. */
#define DARWIN_LIBSYSTEM_HAS_UNWIND
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch Darwin] tidy linkspecs.
2010-07-20 16:22 [Patch Darwin] tidy linkspecs IainS
@ 2010-07-22 2:24 ` Mike Stump
2010-07-22 8:04 ` IainS
0 siblings, 1 reply; 3+ messages in thread
From: Mike Stump @ 2010-07-22 2:24 UTC (permalink / raw)
To: IainS; +Cc: GCC Patches, mrs
On Jul 20, 2010, at 9:22 AM, IainS wrote:
> OK for trunk?
Ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch Darwin] tidy linkspecs.
2010-07-22 2:24 ` Mike Stump
@ 2010-07-22 8:04 ` IainS
0 siblings, 0 replies; 3+ messages in thread
From: IainS @ 2010-07-22 8:04 UTC (permalink / raw)
To: GCC Patches; +Cc: mrs
On 22 Jul 2010, at 03:24, Mike Stump wrote:
> On Jul 20, 2010, at 9:22 AM, IainS wrote:
>> OK for trunk?
>
> Ok.
r162403
Iain
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-22 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-20 16:22 [Patch Darwin] tidy linkspecs IainS
2010-07-22 2:24 ` Mike Stump
2010-07-22 8:04 ` IainS
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).