This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Use LINK_PLUGIN_SPEC on Darwin (PR target/48245)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Mike Stump <mikestump at comcast dot net>, DJ Delorie <dj at delorie dot com>, "Dominique d'Humieres" <dominiq at lps dot ens dot fr>, Iain Sandoe <iains at gcc dot gnu dot org>
- Date: Mon, 28 Mar 2011 13:06:27 +0200
- Subject: Use LINK_PLUGIN_SPEC on Darwin (PR target/48245)
When developing the patch to use the linker plugin only if the (plugin)
linker supports it, I had neglected to check for targets that defined
their own version of LD_COMMAND_SPEC. Of course, this couldn't go
unpunished, since there are two of them:
* Darwin has its own version in config/darwin.h. This is updated by the
following patch.
* The only other affected target is DJGPP (i[34567]86-pc-msdosdjgpp*),
but config/i386/djgpp.has no provisions for LTO at all, so I'm not
touching that.
The (almost obvious) patch was tested by Iain on *-darwin9 and by
Dominique on x86_64-darwin10.
Approved by Mike in the PR, installed on mainline.
Rainer
2011-03-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Iain Sandoe <iains@gcc.gnu.org>
PR target/48245
* config/darwin.h (LINK_COMMAND_SPEC_A): Use LINK_PLUGIN_SPEC.
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -184,8 +184,9 @@ extern GTY(()) int darwin_ms_struct;
#define LINK_COMMAND_SPEC_A \
"%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
- %(linker) \
- %{flto*:%<fcompare-debug*} \
+ %(linker)" \
+ LINK_PLUGIN_SPEC \
+ "%{flto*:%<fcompare-debug*} \
%{flto*} \
%l %X %{s} %{t} %{Z} %{u*} \
%{e*} %{r} \
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University