From patchwork Tue Aug 31 10:33:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 63222 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 6B636B713A for ; Tue, 31 Aug 2010 20:34:20 +1000 (EST) Received: (qmail 15817 invoked by alias); 31 Aug 2010 10:34:17 -0000 Received: (qmail 15808 invoked by uid 22791); 31 Aug 2010 10:34:16 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (213.235.205.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 10:34:08 +0000 Received: from basil.firstfloor.org (p5B3C94E9.dip0.t-ipconnect.de [91.60.148.233]) by one.firstfloor.org (Postfix) with ESMTP id 407741A9804F; Tue, 31 Aug 2010 12:34:05 +0200 (CEST) Received: by basil.firstfloor.org (Postfix, from userid 1000) id C7E9AB2824; Tue, 31 Aug 2010 12:34:04 +0200 (CEST) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: Andi Kleen Subject: [PATCH 1/2] Fix LTO bootstrap documentation Date: Tue, 31 Aug 2010 12:33:57 +0200 Message-Id: <1283250838-13800-1-git-send-email-andi@firstfloor.org> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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