Patchwork PATCH: PR bootstrap/45958: --with-build-config=bootstrap-lto doesn't work

login
register
mail settings
Submitter H.J. Lu
Date Oct. 10, 2010, 7:27 a.m.
Message ID <20101010072731.GA19886@intel.com>
Download mbox | patch
Permalink /patch/67337/
State New
Headers show

Comments

H.J. Lu - Oct. 10, 2010, 7:27 a.m.
--with-demangler-in-ld will make gcc to pass "--demangle -plugin ..." to
ld.  But exec-tool.in has

  collect-ld)
    # 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

It doesn't work with "--demangle -plugin ...".  This patch supports
'-plugin' as the second option to the linker.  OK to install?

Thanks.


H.J.
---
2010-10-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/45958
	* exec-tool.in: Support '-plugin' as the second option to the
	linker.
H.J. Lu - Oct. 12, 2010, 3:51 p.m.
On Sun, Oct 10, 2010 at 12:27 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> --with-demangler-in-ld will make gcc to pass "--demangle -plugin ..." to
> ld.  But exec-tool.in has
>
>  collect-ld)
>    # 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
>
> It doesn't work with "--demangle -plugin ...".  This patch supports
> '-plugin' as the second option to the linker.  OK to install?
>
> Thanks.
>
>
> H.J.
> ---
> 2010-10-10  H.J. Lu  <hongjiu.lu@intel.com>
>
>        PR bootstrap/45958
>        * exec-tool.in: Support '-plugin' as the second option to the
>        linker.
>
> diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
> index a146899..020294e 100644
> --- a/gcc/exec-tool.in
> +++ b/gcc/exec-tool.in
> @@ -36,8 +36,8 @@ case "$invoked" in
>     ;;
>   collect-ld)
>     # when using a linker plugin, gcc will always pass '-plugin' as the
> -    # first option to the linker.
> -    if test x"$1" = "x-plugin"; then
> +    # first or second option to the linker.
> +    if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then
>       original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
>     else
>       original=$ORIGINAL_LD_FOR_TARGET
>

PING
Paolo Bonzini - Oct. 12, 2010, 4:36 p.m.
On 10/12/2010 05:51 PM, H.J. Lu wrote:
> On Sun, Oct 10, 2010 at 12:27 AM, H.J. Lu<hongjiu.lu@intel.com>  wrote:
>> --with-demangler-in-ld will make gcc to pass "--demangle -plugin ..." to
>> ld.  But exec-tool.in has
>>
>>   collect-ld)
>>     # 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
>>
>> It doesn't work with "--demangle -plugin ...".  This patch supports
>> '-plugin' as the second option to the linker.  OK to install?
>>
>> Thanks.
>>
>>
>> H.J.
>> ---
>> 2010-10-10  H.J. Lu<hongjiu.lu@intel.com>
>>
>>         PR bootstrap/45958
>>         * exec-tool.in: Support '-plugin' as the second option to the
>>         linker.
>>
>> diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
>> index a146899..020294e 100644
>> --- a/gcc/exec-tool.in
>> +++ b/gcc/exec-tool.in
>> @@ -36,8 +36,8 @@ case "$invoked" in
>>      ;;
>>    collect-ld)
>>      # when using a linker plugin, gcc will always pass '-plugin' as the
>> -    # first option to the linker.
>> -    if test x"$1" = "x-plugin"; then
>> +    # first or second option to the linker.
>> +    if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then
>>        original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
>>      else
>>        original=$ORIGINAL_LD_FOR_TARGET

Ok.

Paolo

Patch

diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
index a146899..020294e 100644
--- a/gcc/exec-tool.in
+++ b/gcc/exec-tool.in
@@ -36,8 +36,8 @@  case "$invoked" in
     ;;
   collect-ld)
     # when using a linker plugin, gcc will always pass '-plugin' as the
-    # first option to the linker.
-    if test x"$1" = "x-plugin"; then
+    # first or second option to the linker.
+    if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then
       original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
     else
       original=$ORIGINAL_LD_FOR_TARGET