diff options
author | Ekaterina Vaartis <vaartis@cock.li> | 2017-06-23 13:54:10 +0000 |
---|---|---|
committer | Ekaterina Vaartis <vaartis@cock.li> | 2017-06-23 13:54:10 +0000 |
commit | 5cb7c56962aae789010ad54cbc08619a1cd2ea0b (patch) | |
tree | 6d1254053e8b00e920421f5e39d02f5aa6ec140c /docs/GoldPlugin.rst | |
parent | d263a71f37d8fceb109058661ed91ad04863e2fb (diff) |
[docs] As of binutils 2.21.51.0.2, ld.bfd supports plugins too, represent this in docs
PR#32760
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/GoldPlugin.rst')
-rw-r--r-- | docs/GoldPlugin.rst | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/docs/GoldPlugin.rst b/docs/GoldPlugin.rst index 88b944a2a0fd..78d38ccb32bd 100644 --- a/docs/GoldPlugin.rst +++ b/docs/GoldPlugin.rst @@ -7,7 +7,7 @@ Introduction Building with link time optimization requires cooperation from the system linker. LTO support on Linux systems requires that you use the -`gold linker`_ which supports LTO via plugins. This is the same mechanism +`gold linker`_ or ld.bfd from binutils >= 2.21.51.0.2, as they support LTO via plugins. This is the same mechanism used by the `GCC LTO`_ project. The LLVM gold plugin implements the gold plugin interface on top of @@ -23,24 +23,22 @@ The LLVM gold plugin implements the gold plugin interface on top of How to build it =============== -You need to have gold with plugin support and build the LLVMgold plugin. -Check whether you have gold running ``/usr/bin/ld -v``. It will report "GNU -gold" or else "GNU ld" if not. If you have gold, check for plugin support -by running ``/usr/bin/ld -plugin``. If it complains "missing argument" then -you have plugin support. If not, such as an "unknown option" error then you -will either need to build gold or install a version with plugin support. +Check for plugin support by running ``/usr/bin/ld -plugin``. If it complains +"missing argument" then you have plugin support. If not, such as an "unknown option" +error then you will either need to build gold or install a recent version +of ld.bfd with plugin support and then build gold plugin. -* Download, configure and build gold with plugin support: +* Download, configure and build ld.bfd with plugin support: .. code-block:: bash $ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils $ mkdir build $ cd build - $ ../binutils/configure --enable-gold --enable-plugins --disable-werror - $ make all-gold + $ ../binutils/configure --disable-werror # ld.bfd includes plugin support by default + $ make all-ld - That should leave you with ``build/gold/ld-new`` which supports + That should leave you with ``build/ld/ld-new`` which supports the ``-plugin`` option. Running ``make`` will additionally build ``build/binutils/ar`` and ``nm-new`` binaries supporting plugins. |