Slow linking for ARM

Bryan Hundven bryanhundven@gmail.com
Fri Dec 24 20:00:00 GMT 2010


On Fri, Dec 24, 2010 at 11:52 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> On Fri, Dec 24, 2010 at 10:02 AM, Yann E. MORIN
> <yann.morin.1998@anciens.enib.fr> wrote:
>> Bryan, Titus, Bill, All,
>>
>> On Friday 24 December 2010 15:53:28 Bill Pringlemeir wrote:
>>> The 'gold' linker has far higher performance for C++
>>> applications with large name mangling, etc.
>>
>> What does it take to replace standard ld with gold? Maybe this could be
>> an option in crosstool-NG (for those architectures which gold supports).
>
> I know that --enable-gold will make binutils with the gold linker 'ld.gold'.
> I'm not sure if it applies to older versions of binutils, but with
> more recent snapshots, you can configure:
>
>  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
>  --enable-ld[=ARG]     build ld [ARG={default,yes,no}]
>
> So, you could say gold is the default and also build the normal ld as 'ld.bfd':
>
> (comment from v2.21 of binutils configure.ac)
>
> # Handle --enable-gold, --enable-ld.
> # --disable-gold [--enable-ld]
> #     Build only ld.  Default option.
> # --enable-gold [--enable-ld]
> #     Build both gold and ld.  Install gold as "ld.gold", install ld
> #     as "ld.bfd" and "ld".
> # --enable-gold=default [--enable-ld]
> #     Build both gold and ld.  Install gold as "ld.gold" and "ld",
> #     install ld as "ld.bfd".
> # --enable-gold[=default] --disable-ld
> #     Build only gold, which is then installed as both "ld.gold" and "ld".
> # --enable-gold --enable-ld=default
> #     Build both gold (installed as "ld.gold") and ld (installed as "ld"
> #     and ld.bfd).
> #     In other words, ld is default
> # --enable-gold=default --enable-ld=default
> #     Error.
>
> Where as 2.20.1 just had --enable-gold, which would use the gold
> linker instead of the bfd linker.
>
> It sounds like the new options are different that the release
> versions, so you might have to look through each version and add
> something like
> BINUTILS_2_20_1_or_later
> BINUTILS_2_21_or_later
>
>
>> And Merry X-Mas to all! :-)
>>
>> 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.  |
>> '------------------------------^-------^------------------^--------------------'
>>

I guess I also forgot to mention that with gold on 2.21, you can
--enable-threads to enable multi-threaded linking, and
--enable-plugins to enable linker plugins (like whopr and lto, and
possibly more in the future...)

> -Bryan
>

-Bryan

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



More information about the crossgcc mailing list