Patchwork Fix combined tree for LTO

login
register
mail settings
Submitter Andrew Pinski
Date Nov. 10, 2012, 6:32 p.m.
Message ID <CA+=Sn1nj_C5rN+65MugZuVav87MnpGwdTG5QNkgO-7cfKvob_A@mail.gmail.com>
Download mbox | patch
Permalink /patch/198202/
State New
Headers show

Comments

Andrew Pinski - Nov. 10, 2012, 6:32 p.m.
On Sat, Nov 10, 2012 at 6:46 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> 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.

Here is the patch which I applied.

Thanks,
Andrew Pinski

2012-11-10  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/55202
        * configure.ac: Set PLUGIN_LD_SUFFIX to just "ld" if it was "ld-new"
        or "collect-ld".
        * configure: Regenerate.




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

Patch

Index: configure
===================================================================
--- configure	(revision 193392)
+++ configure	(working copy)
@@ -21343,6 +21343,12 @@  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 \
+   || test x$PLUGIN_LD_SUFFIX == xcollect-ld ; then
+  PLUGIN_LD_SUFFIX=ld
+fi
 
 # Check whether --with-plugin-ld was given.
 if test "${with_plugin_ld+set}" = set; then :
Index: configure.ac
===================================================================
--- configure.ac	(revision 193392)
+++ configure.ac	(working copy)
@@ -2003,6 +2003,12 @@  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 \
+   || test x$PLUGIN_LD_SUFFIX == xcollect-ld ; 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