Re: configuring gcc 4.6 to use gold for LTO plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7 June 2011 14:51, Ian Lance Taylor wrote:
> Jonathan Wakely <jwakely.gcc@xxxxxxxxx> writes:
>
>> This is because I don't have an in-tree ld and "ld --version 2>&1 |
>> fgrep plugin-opt" fails, so $gcc_cv_lto_plugin=no
>
> You mean ld --help, don't you?

Oops, sorry, yes.  I mean --help, which is the test used in
gcc/configure in the 4.6 branch:

  elif $ORIGINAL_PLUGIN_LD_FOR_TARGET --help 2>/dev/null | grep
plugin-opt > /dev/null; then

>  Does your gold --help show --plugin-opt?

No:

$ ~/tools/Linux-x86_64/lto/bin/ld --help | fgrep plugin
$ ~/tools/Linux-x86_64/lto/bin/ld.gold --help | fgrep plugin
$ ~/tools/Linux-x86_64/lto/bin/ld.gold --version
GNU gold (GNU Binutils 2.21) 1.10
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

But ld.bfd from the same build does:

$ ~/tools/Linux-x86_64/lto/bin/ld.bfd --help | fgrep plugin
  -plugin PLUGIN              Load named plugin
  -plugin-opt ARG             Send arg to last-loaded plugin

That's why I suggested I could solve my problem by using
--with-plugin-ld=blahblah/ld.bfd, because the "ld --help | fgrep
plugin-opt" test would work.

> It should.  If it doesn't, then that's the first thing to fix.  What
> version of gold are you using?  You didn't somehow configure the
> binutils with --disable-plugins, did you?

Not intentionally, no:

$ head ~/src/gcc/binutils-2.21/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure --prefix=/home/wakelj/tools/Linux-x86_64/lto
--enable-lto --enable-gold=default


Thanks for the answers, I now know that what I'm seeing is indeed odd
so that's why I was surprised.  I'll try to get to the bottom of why
gold has plugins disabled but ld.bfd doesn't.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux