new file mode 100644
@@ -0,0 +1,8 @@
+# This option enables LTO slim for stage2 and stage3. It requires lto to
+# be enabled for stage1 with --enable-stage1-languages.
+
+STAGE2_CFLAGS += -fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1 -flto-slim
+STAGE3_CFLAGS += -fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1 -flto-slim
+
+# Ada fails to build with LTO, turn it off for now.
+BOOT_ADAFLAGS += -fno-lto
@@ -2197,6 +2197,9 @@ Enables Link-Time Optimization for host tools during bootstrapping.
@samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding
@option{-flto} to @samp{BOOT_CFLAGS}.
+@item @samp{bootstrap-lto-slim}
+Analogous to @code{bootstrap-lto}.
+
@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
From: Andi Kleen <ak@linux.intel.com> / 2010-10-03 Andi Kleen <ak@linux.intel.com> * config/bootstrap-lto-slim.mk: Add. gcc/ 2010-10-03 Andi Kleen <ak@linux.intel.com> * doc/install.texi (bootstrap-lto-slim): Document. --- config/bootstrap-lto-slim.mk | 8 ++++++++ gcc/doc/install.texi | 3 +++ 2 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 config/bootstrap-lto-slim.mk