diff options
Diffstat (limited to 'gcc/exec-tool.in')
-rw-r--r-- | gcc/exec-tool.in | 9 |
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 ;; |