Hi,
since lto plugin already enables shared libiberty, this patch extends the 
machinery
for plugin itself too.
Does it fix your problem? I seem to be able to bootstrap (C only) with 
disable-shared.

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,
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
 
 

Reply via email to