This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Slow linking for ARM


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. Â|
> '------------------------------^-------^------------------^--------------------'
>

-Bryan

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]