aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-12-02 19:21:10 +0000
committerBill Wendling <isanbard@gmail.com>2013-12-02 19:21:10 +0000
commit92d2d909ed1e7080b50cf99627bb2dcbbc9b2a8b (patch)
treeaf567e079cbeef51fbbf2d80a9077cb0d714fa12 /docs
parentb70b8c3a931ad81256f193c81be6487f936357a8 (diff)
downloadexternal_llvm-92d2d909ed1e7080b50cf99627bb2dcbbc9b2a8b.zip
external_llvm-92d2d909ed1e7080b50cf99627bb2dcbbc9b2a8b.tar.gz
external_llvm-92d2d909ed1e7080b50cf99627bb2dcbbc9b2a8b.tar.bz2
Merging r196069:
------------------------------------------------------------------------ r196069 | alp | 2013-12-01 23:15:33 -0800 (Sun, 01 Dec 2013) | 6 lines Update the LTO GoldPlugin documentation * Update build instructions to reflect the current source tree layout. * Don't inflict CVS on readers; there's a perfectly good git mirror. * configure with --disable-werror making it possible to build using clang. * ar and nm-new now support the -plugin option. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/GoldPlugin.rst28
1 files changed, 11 insertions, 17 deletions
diff --git a/docs/GoldPlugin.rst b/docs/GoldPlugin.rst
index d0161e8..28b202a 100644
--- a/docs/GoldPlugin.rst
+++ b/docs/GoldPlugin.rst
@@ -30,29 +30,22 @@ 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.
-* To build gold with plugin support:
+* Download, configure and build gold with plugin support:
.. code-block:: bash
- $ mkdir binutils
- $ cd binutils
- $ cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login
- {enter "anoncvs" as the password}
- $ cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
+ $ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils
$ mkdir build
$ cd build
- $ ../src/configure --enable-gold --enable-plugins
+ $ ../binutils/configure --enable-gold --enable-plugins --disable-werror
$ make all-gold
- That should leave you with ``binutils/build/gold/ld-new`` which supports
- the ``-plugin`` option. It also built would have
- ``binutils/build/binutils/ar`` and ``nm-new`` which support plugins but
- don't have a visible -plugin option, instead relying on the gold plugin
- being present in ``../lib/bfd-plugins`` relative to where the binaries
- are placed.
+ That should leave you with ``build/gold/ld-new`` which supports
+ the ``-plugin`` option. Running ``make`` will additionally build
+ ``build/binutils/ar`` and ``nm-new`` binaries supporting plugins.
* Build the LLVMgold plugin: Configure LLVM with
- ``--with-binutils-include=/path/to/binutils/src/include`` and run
+ ``--with-binutils-include=/path/to/binutils/include`` and run
``make``.
Usage
@@ -72,9 +65,10 @@ the ``lib`` directory under its prefix and pass the ``-plugin`` option to
``ld``. It will not look for an alternate linker, which is why you need
gold to be the installed system linker in your path.
-If you want ``ar`` and ``nm`` to work seamlessly as well, install
-``LLVMgold.so`` to ``/usr/lib/bfd-plugins``. If you built your own gold, be
-sure to install the ``ar`` and ``nm-new`` you built to ``/usr/bin``.
+``ar`` and ``nm`` also accept the ``-plugin`` option and it's possible to
+to install ``LLVMgold.so`` to ``/usr/lib/bfd-plugins`` for a seamless setup.
+If you built your own gold, be sure to install the ``ar`` and ``nm-new`` you
+built to ``/usr/bin``.
Example of link time optimization