From patchwork Sun Oct 17 22:07:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 68097 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 7E287B70ED for ; Mon, 18 Oct 2010 09:07:29 +1100 (EST) Received: (qmail 5856 invoked by alias); 17 Oct 2010 22:07:26 -0000 Received: (qmail 5792 invoked by uid 22791); 17 Oct 2010 22:07:25 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 Oct 2010 22:07:21 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 17 Oct 2010 15:07:19 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by azsmga001.ch.intel.com with ESMTP; 17 Oct 2010 15:07:19 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 70E25204FD; Sun, 17 Oct 2010 15:07:19 -0700 (PDT) Date: Sun, 17 Oct 2010 15:07:19 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: PATCH: PR bootstrap/45954: LTO isn't enabled in stage1 cc1 with --with-build-config=bootstrap-lto Message-ID: <20101017220719.GA16824@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 Hi, This patch enables lto for stage1 if LTO is enabled. OK for trunk? Thanks. H.J. --- 2010-10-17 H.J. Lu PR bootstrap/45954 * configure.ac: Enable lto for stage1 if LTO is enabled. * configure: Regenerated. diff --git a/configure b/configure index b1fbfaa..1397c11 100755 --- a/configure +++ b/configure @@ -6711,7 +6711,11 @@ fi # By default, C is the only stage 1 language. -stage1_languages=,c, +if test "$enable_lto" = "yes" ; then + stage1_languages=,c,lto, +else + stage1_languages=,c, +fi # Target libraries that we bootstrap. bootstrap_target_libs=,target-libgcc, @@ -6905,7 +6909,12 @@ if test "${enable_stage1_languages+set}" = set; then : enableval=$enable_stage1_languages; case ,${enable_stage1_languages}, in ,no,|,,) # Set it to something that will have no effect in the loop below - enable_stage1_languages=c ;; + if test "$enable_lto" = "yes" ; then + enable_stage1_languages=c,lto + else + enable_stage1_languages=c + fi + ;; ,yes,) enable_stage1_languages=`echo $new_enable_languages | \ sed -e "s/^,//" -e "s/,$//" ` ;; diff --git a/configure.ac b/configure.ac index bf5fe3a..f4521bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1817,7 +1817,11 @@ fi],[if test x"$default_enable_lto" = x"yes" ; then # By default, C is the only stage 1 language. -stage1_languages=,c, +if test "$enable_lto" = "yes" ; then + stage1_languages=,c,lto, +else + stage1_languages=,c, +fi # Target libraries that we bootstrap. bootstrap_target_libs=,target-libgcc, @@ -2012,7 +2016,12 @@ if test -d ${srcdir}/gcc; then [case ,${enable_stage1_languages}, in ,no,|,,) # Set it to something that will have no effect in the loop below - enable_stage1_languages=c ;; + if test "$enable_lto" = "yes" ; then + enable_stage1_languages=c,lto + else + enable_stage1_languages=c + fi + ;; ,yes,) enable_stage1_languages=`echo $new_enable_languages | \ sed -e "s/^,//" -e "s/,$//" ` ;;