[PATCH] Add -print-lto-plugin
H.J. Lu
hjl.tools@gmail.com
Sun Oct 3 09:43:00 GMT 2010
On Sun, Oct 3, 2010 at 2:36 AM, Andi Kleen <andi@firstfloor.org> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> On Sat, Oct 2, 2010 at 8:41 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Sat, Oct 2, 2010 at 2:24 PM, Andi Kleen <andi@firstfloor.org> wrote:
>>>> From: Andi Kleen <ak@linux.intel.com>
>>>>
>>>> binutils have LTO linker plugin support now, but it requires hardcoding
>>>> the path to gcc's libexec dir in the Makefile. Add an option to the
>>>> gcc driver instead to print the full file name to avoid this.
>>>>
>>>
>>>
>>> It sounds wrong to me. Linker shouldn't hardcode the path to
>>> gcc's libexec, which should be passed down to linker from gcc.
>>
>> If you are referring to "ar --plugin", gcc-ar or something like it
>> works better.
>
> ar, ranlib and nm yes.
>
> Are you suggesting to add standard gcc-ar / gcc-ranlib
> wrappers to gcc?
>
> If that's the consensus I can do that, but personally
> ar --plugin `gcc -print-lto-plugin` seems better for me.
You can use
gcc -print-prog-name=liblto_plugin.so
today.
> [That is there is still a bug in binutils that you
> always have to set GNUTARGET=plugin too, but I hope that
> will get eventually fixed]
It has been fixed. If not, please open a bug report.
--
H.J.
More information about the Gcc-patches
mailing list