aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-01-08 02:37:00 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2011-01-08 01:37:00 +0000
commit96bdf9b4035f9628ee214b9d773c313b065e36bf (patch)
tree6f419805e71a133ecdcbe5137da91c38f6dab263 /gcc/doc
parentf35cafc9ff3898a2205a2089f315f19640da1041 (diff)
downloadgcc-96bdf9b4035f9628ee214b9d773c313b065e36bf.zip
gcc-96bdf9b4035f9628ee214b9d773c313b065e36bf.tar.gz
gcc-96bdf9b4035f9628ee214b9d773c313b065e36bf.tar.bz2
Makefile.in: Regenerate.
* Makefile.in: Regenerate. * Makefile.def (gcc host module) and soft dependency on lto-plugin and configure dependency on lto-plugin configure. (lto-plugin module): Remove dependency on GCC; add dependency on liniberty. * doc/invoke.texi: (-flto, -fuse-linker-plugin): Update defaults and no longer claim that gold is required for linker plugin. * configure: Regenerate. * gcc.c (PLUGIN_COND): New macro. (LINK_COMMAND_SPEC): Use it. (main): Default to plugin enabled with HAVE_LTO_PLUGIN is set. * config.in (HAVE_LTO_PLUGIN): New. * configure.ac (--with-lto-plugin): New parameter; autodetect HAVE_LTO_PLUGIN. From-SVN: r168593
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi37
1 files changed, 21 insertions, 16 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8d67e96..800c592 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7587,23 +7587,21 @@ types in separate translation units to be linked together (undefined
behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
issued. The behavior is still undefined at runtime.
-If object files containing GIMPLE bytecode are stored in a library
-archive, say @file{libfoo.a}, it is possible to extract and use them
-in an LTO link if you are using @command{gold} as the linker (which,
-in turn requires GCC to be configured with @option{--enable-gold}).
-To enable this feature, use the flag @option{-fuse-linker-plugin} at
-link-time:
+If object files containing GIMPLE bytecode are stored in a library archive, say
+@file{libfoo.a}, it is possible to extract and use them in an LTO link if you
+are using a linker with linker plugin support. To enable this feature, use
+the flag @option{-fuse-linker-plugin} at link-time:
@smallexample
gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo
@end smallexample
-With the linker plugin enabled, @command{gold} will extract the needed
+With the linker plugin enabled, the linker will extract the needed
GIMPLE files from @file{libfoo.a} and pass them on to the running GCC
to make them part of the aggregated GIMPLE image to be optimized.
-If you are not using @command{gold} and/or do not specify
-@option{-fuse-linker-plugin} then the objects inside @file{libfoo.a}
+If you are not using a linker with linker plugin support and/or do not
+enable linker plugin then the objects inside @file{libfoo.a}
will be extracted and linked as usual, but they will not participate
in the LTO optimization process.
@@ -7667,13 +7665,20 @@ files in LTO mode (via @option{-flto}).
Disabled by default.
@item -fuse-linker-plugin
-Enables the extraction of objects with GIMPLE bytecode information
-from library archives. This option relies on features available only
-in @command{gold}, so to use this you must configure GCC with
-@option{--enable-gold}. See @option{-flto} for a description on the
-effect of this flag and how to use it.
-
-Disabled by default.
+Enables the use of linker plugin during link time optimization. This option
+relies on the linker plugin support in linker that is available in @code{gold}
+or in GNU ld 2.21.51 or newer..
+
+This option enables the extraction of object files with GIMPLE bytecode out of
+library archives. This improves the quality of optimization by exposing more
+code the the link time optimizer. This information specify what symbols
+can be accessed externally (by non-LTO object or during dynamic linking).
+Resulting code quality improvements on binaries (and shared libaries that do
+use hidden visibility) is similar to @code{-fwhole-program}. See
+@option{-flto} for a description on the effect of this flag and how to use it.
+
+Enabled by default when LTO support in GCC is enabled and GCC was compiled
+with linker supporting plugins (GNU ld or @code{gold}).
@item -fcprop-registers
@opindex fcprop-registers