[PATCH 0 of 3] Add support for using gold instead of ld

Bryan Hundven bryanhundven@gmail.com
Tue Dec 28 19:07:00 GMT 2010


On Tue, Dec 28, 2010 at 3:13 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Bryan, Arnaud, All,
>
> On Tuesday 28 December 2010 01:22:56 Bryan Hundven wrote:
>> On Mon, Dec 27, 2010 at 4:18 PM, Bryan Hundven <bryanhundven@gmail.com> wrote:
>> > On Mon, Dec 27, 2010 at 3:58 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
>> >> That is incomplete You also need to pass --enable-gold to gcc's
>> >> configure to build the linker plugin.
>> > Right. Is this only when ld.gold is ld?
>> > Or just when gold is enabled at all.
>>
>> Actually, to answer my own question, for gcc 4.5.x, the only option is
>> to --enable-gold (just like binutils 2.20x). for gcc 4.6.x the options
>> would be the same as binutils 2.21.
>
> Really? There's nothing suggesting so in:
> http://gcc.gnu.org/viewcvs/trunk/gcc/doc/install.texi?revision=168202&content-type=text%2Fplain&view=co
>
> In there, only --enable-gold is documented. Or I can't read texi. :-)

I know that I can't read texi... so:

http://gcc.gnu.org/install/configure.html

> If you looked at ./configure and saw the same options as for binutils, then
> do not be confused. Those GNU guys use a shared (templated?) ./configure, so
> you may got mislead...

Read gcc-<version>/configure.ac
Search for `enable-gold'.
WRT future versions of gcc, I'd suggest grabbing a snapshot or looking
at svn checkout and read the same configure.ac, as it seems things
change in gcc >= 4.6.x.

> What I understood is:
>  1) --enable-gold is available starting with gcc-4.5, and 4.6 did not change

enable-gold has been in gcc since 4.4.

>  3) --enable-gold does nothing by itself

Well, it does. it just builds gcc with the ld.gold linker.
So `nothing' is actually something.

>  4) --enable-gold with --enable-lto builds a plugin that gold can use to
>    handle LTO

This is true with gcc 4.5 and greater.

>  5) there's no 2)
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list