Hello!

Attached patch introduces bootstrap-lto-noplugin bootstrap
configuration for hosts that do not support linker plugin (e.g. CentOS
5.11 with binutils 2.17). Also, the patch adds some additional
documentation to bootstrap-lto option.

config/ChangeLog:

2015-03-24  Uros Bizjak  <ubiz...@gmail.com>

    PR bootstrap/65537
    * bootstrap-lto-noplugin.mk: New build configuration.

gcc/ChangeLog:

2015-03-24  Uros Bizjak  <ubiz...@gmail.com>

    PR bootstrap/65537
    * doc/install.texi (Building a native compiler): Document new
    bootstrap-lto-noplugin configuration.  Mention that bootstrap-lto
    configuration assumes that the host supports the linker plugin.

Patch was bootstrapped and tested on x86_64-linux-gnu (CentOS 5.11)
host, configured with --with-build-config=bootstrap-lto build
configuration.

OK for mainline?

Uros.
Index: config/bootstrap-lto-noplugin.mk
===================================================================
--- config/bootstrap-lto-noplugin.mk    (revision 0)
+++ config/bootstrap-lto-noplugin.mk    (working copy)
@@ -0,0 +1,6 @@
+# This option enables LTO for stage2 and stage3 on
+# hosts without linker plugin support.
+
+STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGEprofile_CFLAGS += -fno-lto
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi        (revision 221636)
+++ gcc/doc/install.texi        (working copy)
@@ -2519,8 +2519,14 @@
 @item @samp{bootstrap-lto}
 Enables Link-Time Optimization for host tools during bootstrapping.
 @samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding
-@option{-flto} to @samp{BOOT_CFLAGS}.
+@option{-flto} to @samp{BOOT_CFLAGS}.  This option assumes that the host
+supports the linker plugin (e.g. GNU ld version 2.21 or later or GNU gold
+version 2.21 or later).
 
+@item @samp{bootstrap-lto-noplugin}
+This option is similar to @code{bootstrap-lto}, but is intended for
+hosts that do not support the linker plugin.
+
 @item @samp{bootstrap-debug}
 Verifies that the compiler generates the same executable code, whether
 or not it is asked to emit debug information.  To this end, this

Reply via email to