Patchwork Fix combined tree for LTO

login
register
mail settings
Submitter Thomas Schwinge
Date Dec. 20, 2012, 3:58 p.m.
Message ID <87y5gspveq.fsf@kepler.schwinge.homeip.net>
Download mbox | patch
Permalink /patch/207680/
State Accepted, archived
Headers show

Comments

Thomas Schwinge - Dec. 20, 2012, 3:58 p.m.
Hi!

On Sat, 10 Nov 2012 10:32:07 -0800, Andrew Pinski <andrew.pinski@caviumnetworks.com> wrote:
> 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.

> 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

Using dash, this caused:

    checking for ld... /usr/bin/ld
    [...]/gcc/configure: 21384: test: xld: unexpected operator
    [...]/gcc/configure: 21385: test: xld: unexpected operator
    checking whether we are using gold... no

Fixed in r194637:

    	PR bootstrap/55202
    	* configure.ac <PLUGIN_LD_SUFFIX>: Use POSIX shell syntax.
    	* configure: Regenerate.



Grüße,
 Thomas

Patch

diff --git gcc/configure.ac gcc/configure.ac
index c6f57bd..7abe7cf 100644
--- gcc/configure.ac
+++ gcc/configure.ac
@@ -2031,8 +2031,8 @@  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
+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,