Patchwork [3/3] Add bootstrap-lto-slim build config

login
register
mail settings
Submitter Andi Kleen
Date Oct. 16, 2010, 3:09 p.m.
Message ID <1287241747-2496-4-git-send-email-andi@firstfloor.org>
Download mbox | patch
Permalink /patch/68035/
State New
Headers show

Comments

Andi Kleen - Oct. 16, 2010, 3:09 p.m.
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

Patch

diff --git a/config/bootstrap-lto-slim.mk b/config/bootstrap-lto-slim.mk
new file mode 100644
index 0000000..af08db4
--- /dev/null
+++ b/config/bootstrap-lto-slim.mk
@@ -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
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index ce6b5cf..0ef8e60 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -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