Fix combined tree for LTO

Submitted by Andrew Pinski on Nov. 10, 2012, 4:30 a.m.

Details

Message ID CA+=Sn1mES-hbm4x-iZHdJjCX0NAeEeNT+TX8TDQsctx3u=snEA@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski Nov. 10, 2012, 4:30 a.m.
Hi,
  The problem here is that set PLUGIN_LD_SUFFIX to ld-new which is not
the final installed binary name.  This patch fixes the problem by
changing if we got ld-new to just ld.
Note this issue has been around since 4.6 but not many people test
installed binary and it does not show up while doing testing from the
combined tree either.

OK?  Bootstrapped and tested with and without being in a combined tree
without any regressions.

Thanks,
Andrew Pinski

* configure.ac: Set PLUGIN_LD_SUFFIX to just "ld" if it was "ld-new".
* configure: Regenerate.

Comments

Paolo Bonzini Nov. 10, 2012, 2:46 p.m.
Il 10/11/2012 05:30, Andrew Pinski ha scritto:
> Hi,
>   The problem here is that set PLUGIN_LD_SUFFIX to ld-new which is not
> the final installed binary name.  This patch fixes the problem by
> changing if we got ld-new to just ld.
> Note this issue has been around since 4.6 but not many people test
> installed binary and it does not show up while doing testing from the
> combined tree either.
> 
> OK?  Bootstrapped and tested with and without being in a combined tree
> without any regressions.

OK with one change: please make it test collect-ld as well.

Paolo

> Thanks,
> Andrew Pinski
> 
> * configure.ac: Set PLUGIN_LD_SUFFIX to just "ld" if it was "ld-new".
> * configure: Regenerate.
>

Patch hide | download patch | download mbox

diff --git a/gcc/configure b/gcc/configure
index 55164b6..bce98ad 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -21343,6 +21343,11 @@  fi
 
 ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
 PLUGIN_LD_SUFFIX=`basename $gcc_cv_ld | sed -e "s,$target_alias-,,"`
+# if the PLUGIN_LD is set ld-new, just have it as ld
+# as that is the installed named.
+if test x$PLUGIN_LD_SUFFIX == xld-new; then
+  PLUGIN_LD_SUFFIX=ld
+fi
 
 # Check whether --with-plugin-ld was given.
 if test "${with_plugin_ld+set}" = set; then :
diff --git a/gcc/configure.ac b/gcc/configure.ac
index fbda2cc..39d8b43 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2003,6 +2003,11 @@  fi])
 
 ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
 PLUGIN_LD_SUFFIX=`basename $gcc_cv_ld | sed -e "s,$target_alias-,,"`
+# if the PLUGIN_LD is set ld-new, just have it as ld
+# as that is the installed named.
+if test x$PLUGIN_LD_SUFFIX == xld-new; then
+  PLUGIN_LD_SUFFIX=ld
+fi
 AC_ARG_WITH(plugin-ld,
 [AS_HELP_STRING([[--with-plugin-ld=[ARG]]], [specify the plugin linker])],
 [if test x"$withval" != x; then