From patchwork Tue Aug 31 10:33:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] Fix LTO bootstrap documentation Date: Tue, 31 Aug 2010 00:33:57 -0000 From: Andi Kleen X-Patchwork-Id: 63222 Message-Id: <1283250838-13800-1-git-send-email-andi@firstfloor.org> To: gcc-patches@gcc.gnu.org Cc: Andi Kleen From: Andi Kleen BUILD_CONFIG=bootstrap-lto does not work currently and causes build failures. Remove a reference to that in the install documentation and instead document a working method using BOOT_CFLAGS. Bootstrapped on x86-64 together with the -fwhopr=jobserver patchkit v2: Fix grammar/texinfo based on feedback Ok to commit? 2010-08-17 Andi Kleen * doc/install.texi (Building a native compiler): Remove reference to broken BUILD_CONFIG=bootstrap-lto. Document working method instead. --- gcc/doc/install.texi | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index fc9b988..e98675d 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -2108,6 +2108,13 @@ to work around this, by choosing @code{BOOT_CFLAGS} to avoid the parts of the stage1 compiler that were miscompiled, or by using @samp{make bootstrap4} to increase the number of stages of bootstrap. +You can also use @code{BOOT_CFLAGS} to force an LTO bootstrap with +@samp{BOOT_CFLAGS='-O2 -fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1'}. +Configure the compiler with @samp{--enable-stage1-languages=c,lto}. This +will only work with the @command{gold} linker and if linker plugins are +correctly configured. The @option{-frandom-seed=1} is needed to avoid +bootstrap comparison failures. + @code{BOOT_CFLAGS} does not apply to bootstrapped target libraries. Since these are always compiled with the compiler currently being bootstrapped, you can use @code{CFLAGS_FOR_TARGET} to modify their @@ -2155,11 +2162,6 @@ Removes any @option{-O}-started option from @code{BOOT_CFLAGS}, and adds @item @samp{bootstrap-O3} Analogous to @code{bootstrap-O1}. -@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}. - @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