From patchwork Sat Jan 8 20:33:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 77987 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 E6B6EB7146 for ; Sun, 9 Jan 2011 07:33:35 +1100 (EST) Received: (qmail 9142 invoked by alias); 8 Jan 2011 20:33:33 -0000 Received: (qmail 9128 invoked by uid 22791); 8 Jan 2011 20:33:32 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 08 Jan 2011 20:33:26 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id B35069AC821; Sat, 8 Jan 2011 21:33:23 +0100 (CET) Date: Sat, 8 Jan 2011 21:33:23 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, bonzini@gcc.gnu.org Subject: Fix bootstrap with --disable-shared and linker plugin Message-ID: <20110108203323.GD28524@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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, my patch to enable linker plugin by default broke bootstrap with --disable-shared since we build linker plugin as static library. This is pointless. This patch arranges --enable-shared into lto-plugin conifgury same was as we already do for libiberty. The patch was confirmed to fix the reported issue and I also tested it with --disable-shared C only bootstrap. Bootstrapped/regtested x86_64-linux, OK? Honza PR lto/47225 * Makefile.def (lto-plugin module): Add @extra_host_lto_plugin_configure_flags. * configure.ac: Set extra_host_lto_plugin_configure_flags=--enable-shared when doing plugin. * Makefile.in: Regenerate. * configure: Regenerate. Index: Makefile.def =================================================================== --- Makefile.def (revision 168596) +++ Makefile.def (working copy) @@ -145,7 +145,8 @@ host_modules= { module= libtermcap; no_c missing=maintainer-clean; }; host_modules= { module= utils; no_check=true; }; host_modules= { module= gnattools; }; -host_modules= { module= lto-plugin; bootstrap=true; }; +host_modules= { module= lto-plugin; bootstrap=true; + extra_configure_flags='@extra_host_lto_plugin_configure_flags@'; }; target_modules = { module= libstdc++-v3; bootstrap=true; Index: Makefile.in =================================================================== --- Makefile.in (revision 168596) +++ Makefile.in (working copy) @@ -45248,7 +45248,7 @@ configure-lto-plugin: libsrcdir="$$s/lto-plugin"; \ $(SHELL) $${libsrcdir}/configure \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} $${srcdiroption} \ + --target=${target_alias} $${srcdiroption} @extra_host_lto_plugin_configure_flags@ \ || exit 1 @endif lto-plugin @@ -45282,7 +45282,8 @@ configure-stage1-lto-plugin: $(SHELL) $${libsrcdir}/configure \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ - $(STAGE1_CONFIGURE_FLAGS) + $(STAGE1_CONFIGURE_FLAGS) \ + @extra_host_lto_plugin_configure_flags@ @endif lto-plugin-bootstrap .PHONY: configure-stage2-lto-plugin maybe-configure-stage2-lto-plugin @@ -45315,7 +45316,8 @@ configure-stage2-lto-plugin: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE2_CONFIGURE_FLAGS) + $(STAGE2_CONFIGURE_FLAGS) \ + @extra_host_lto_plugin_configure_flags@ @endif lto-plugin-bootstrap .PHONY: configure-stage3-lto-plugin maybe-configure-stage3-lto-plugin @@ -45348,7 +45350,8 @@ configure-stage3-lto-plugin: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE3_CONFIGURE_FLAGS) + $(STAGE3_CONFIGURE_FLAGS) \ + @extra_host_lto_plugin_configure_flags@ @endif lto-plugin-bootstrap .PHONY: configure-stage4-lto-plugin maybe-configure-stage4-lto-plugin @@ -45381,7 +45384,8 @@ configure-stage4-lto-plugin: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE4_CONFIGURE_FLAGS) + $(STAGE4_CONFIGURE_FLAGS) \ + @extra_host_lto_plugin_configure_flags@ @endif lto-plugin-bootstrap .PHONY: configure-stageprofile-lto-plugin maybe-configure-stageprofile-lto-plugin @@ -45414,7 +45418,8 @@ configure-stageprofile-lto-plugin: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEprofile_CONFIGURE_FLAGS) + $(STAGEprofile_CONFIGURE_FLAGS) \ + @extra_host_lto_plugin_configure_flags@ @endif lto-plugin-bootstrap .PHONY: configure-stagefeedback-lto-plugin maybe-configure-stagefeedback-lto-plugin @@ -45447,7 +45452,8 @@ configure-stagefeedback-lto-plugin: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEfeedback_CONFIGURE_FLAGS) + $(STAGEfeedback_CONFIGURE_FLAGS) \ + @extra_host_lto_plugin_configure_flags@ @endif lto-plugin-bootstrap Index: configure =================================================================== --- configure (revision 168596) +++ configure (working copy) @@ -640,6 +640,7 @@ CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET SYSROOT_CFLAGS_FOR_TARGET stage1_languages +extra_host_lto_plugin_configure_flags extra_host_libiberty_configure_flags clooginc clooglibs @@ -6237,6 +6238,7 @@ if test -d ${srcdir}/gcc; then # If LTO is enabled, add the LTO front end. extra_host_libiberty_configure_flags= + extra_host_lto_plugin_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -6245,10 +6247,12 @@ if test -d ${srcdir}/gcc; then if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" extra_host_libiberty_configure_flags=--enable-shared + extra_host_lto_plugin_configure_flags=--enable-shared fi fi + missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, Index: configure.ac =================================================================== --- configure.ac (revision 168596) +++ configure.ac (working copy) @@ -1810,6 +1810,7 @@ if test -d ${srcdir}/gcc; then # If LTO is enabled, add the LTO front end. extra_host_libiberty_configure_flags= + extra_host_lto_plugin_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -1818,9 +1819,11 @@ if test -d ${srcdir}/gcc; then if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" extra_host_libiberty_configure_flags=--enable-shared + extra_host_lto_plugin_configure_flags=--enable-shared fi fi AC_SUBST(extra_host_libiberty_configure_flags) + AC_SUBST(extra_host_lto_plugin_configure_flags) missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c,