aboutsummaryrefslogtreecommitdiff
path: root/gcc/exec-tool.in
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2009-11-08 22:36:51 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2009-11-08 14:36:51 -0800
commit5938f74ded1210131d04396065bb5cab7520a6a3 (patch)
treea77de50fab65df010cf9b254b0984429a0105147 /gcc/exec-tool.in
parentaeaebc93216fe846ebb66523caa1f50b170617b8 (diff)
downloadgcc-5938f74ded1210131d04396065bb5cab7520a6a3.zip
gcc-5938f74ded1210131d04396065bb5cab7520a6a3.tar.gz
gcc-5938f74ded1210131d04396065bb5cab7520a6a3.tar.bz2
collect2.c (main): Search PLUGIN_LD for plugin linker.
2009-11-08 H.J. Lu <hongjiu.lu@intel.com> * collect2.c (main): Search PLUGIN_LD for plugin linker. * configure.ac (--with-plugin-ld): New. Default to ld. * configure: Regenerated. * config.in: Likewise. * exec-tool.in (ORIGINAL_PLUGIN_LD_FOR_TARGET): New. (collect-ld): Use ORIGINAL_PLUGIN_LD_FOR_TARGET for -plugin. From-SVN: r154020
Diffstat (limited to 'gcc/exec-tool.in')
-rw-r--r--gcc/exec-tool.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
index f585163..a146899 100644
--- a/gcc/exec-tool.in
+++ b/gcc/exec-tool.in
@@ -21,6 +21,7 @@
ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@"
ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@"
+ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@"
ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@"
exeext=@host_exeext@
fast_install=@enable_fast_install@
@@ -34,7 +35,13 @@ case "$invoked" in
dir=gas
;;
collect-ld)
- original=$ORIGINAL_LD_FOR_TARGET
+ # when using a linker plugin, gcc will always pass '-plugin' as the
+ # first option to the linker.
+ if test x"$1" = "x-plugin"; then
+ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
+ else
+ original=$ORIGINAL_LD_FOR_TARGET
+ fi
prog=ld-new$exeext
dir=ld
;;