[PATCH 00 of 10] Add support for using gold instead of ld, v2

Bryan Hundven bryanhundven@gmail.com
Thu Dec 30 23:47:00 GMT 2010


Yann,

On Thu, Dec 30, 2010 at 3:18 PM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Hello All!
>
> This patchset is a tentative at using gold in place of ld with recent
> binutils (2.21 at least) and gcc (4.5.0 at least).
>
> Enabling gold on binutils 2.20 and 2.20.1 makes the code more complex,
> as the configure options have changed; so only 2.21 upward are expected
> to build gold; this makes things easier, code-wise.
>
> Interaction between gcc and binutils really makes sense when using LTO,
> as in this case gcc install the lto-plugin used by gold. As LTO is only
> available since gcc-4.5, only those versions are impacted.
>
> Note that it is possible to build gold, for any version of gcc used.
> In this case, there is no gain to configure gcc to be aware that gold
> is being used (AFAIK).
>
> Currently, glibc can not be built with gold (fails on the ld version
> check), and uClibc builds fine with a minor edit in the linker flags
> (which is already applied upstream).
>
> Basically, the patch series adds support for building gold or ld or
> both, and in the latter case, set which is the default. It also adds
> a (shell) wrapper that can override the default at runtime. For gcc,
> it makes gcc>=4.5 also buld and install the lto-plugin. There are also
> a few ancilliary patches, of which updating a sample enabling gold and
> lto-plugin.
>
> Shortlog:
>  complibs/libelf: build with -fPIC
>  binutils/binutils: add BINUTILS_2_21_or_later blind option
>  binutils/binutils: add option to enable gold
>  binutils/binutils: add support for gold plugins
>  binutils/binutils: add support for threaded gold
>  binutils/binutils: add wrapper to gold and ld
>  cc/gcc: build lto-plugin if binutils' gold is built
>  samples: update i686-nptl-linux-gnu
>  cc/gcc: fix building of ecjx
>  samples: update i686-nptl-linux-gnu
>
> Diffstat:
>  b/config/binutils/binutils.in                  |  111   111     0     0 +++++++++++++++++++++++++
>  b/patches/gcc/4.5.0/100-ecjx-host.patch        |   13    13     0     0 +++
>  b/patches/gcc/4.5.1/100-ecjx-host.patch        |   13    13     0     0 +++
>  b/patches/gcc/4.5.2/100-ecjx-host.patch        |   13    13     0     0 +++
>  b/samples/i686-nptl-linux-gnu/crosstool.config |   96    69    27     0 ++++++++++++++++------
>  b/scripts/build/binutils/binutils-ld.in        |   11    11     0     0 ++
>  b/scripts/build/binutils/binutils.sh           |   44    43     1     0 ++++++++++
>  b/scripts/build/cc/gcc.sh                      |   10    10     0     0 ++
>  b/scripts/build/companion_libs/libelf.sh       |    2     2     0     0 +
>  9 files changed, 285 insertions(+), 28 deletions(-)
>
> TODO:
> - add a C wrapper, for systems which may lack a shell (eg. mingw)
> - _maybe_ backport uClibc patch to make it build with gold
>
> Thank you to Arnaud and Bryan for their help and comments!

Would it be possible to commit these to a branch or add a hosted mq on
your hg server with these changes?

It's a pita to get these patches from inline on gmail.

> Regards,
> Yann E. MORIN.
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
>

Thanks in advance,

-Bryan

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



More information about the crossgcc mailing list