aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog45
-rw-r--r--Makefile.def7
-rw-r--r--Makefile.in1008
-rw-r--r--Makefile.tpl8
-rwxr-xr-xconfigure880
-rw-r--r--configure.ac154
6 files changed, 2084 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 9fdf831..86c4533 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2009-10-06 Ian Lance Taylor <iant@google.com>
+
+ * Makefile.def: check-gold depends upon all-gas.
+ * Makefile.in: Rebuild.
+
+2009-10-03 2009-02-05 Rafael Avila de Espindola <espindola@google.com>
+
+ * Makefile.def: all-lto-plugin depends on all-libiberty.
+ set bootstrap=true for lto-plugin.
+ Add lto-plugin.
+ * Makefile.in: Regenerate.
+ * configure.ac (host_libs): Add lto-plugin.
+ * configure: Regenerate.
+
+2009-10-03 Diego Novillo <dnovillo@google.com>
+
+ * Makefile.tpl (HOST_EXPORTS): Add LIBELFLIBS and LIBELFINC.
+ (HOST_LIBELFLIBS): Define.
+ (HOST_LIBELFINC): Define.
+ * Makefile.in: Regenerate.
+ * configure.ac: Add --enable-lto.
+ Add --with-libelf, --with-libelf-include and --with-libelf-lib.
+ If --enable-lto is used, add 'lto' to new_enable_languages.
+ If --enable-lto is used and gold is enabled, add
+ lto-plugin to configdirs.
+ * configure: Regenerate.
+
+2009-10-03 Simon Baldwin <simonb@google.com>
+
+ * configure.ac: If --with-system-zlib, suppress local zlib and
+ pass --with-system-zlib to subdir configure scripts.
+ * configure: Regenerate.
+
+2009-10-01 Loren J. Rittle <ljrittle@acm.org>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Use $$s rather than
+ $(srcdir).
+ * Makefile.in: Rebuilt.
+
2009-09-29 Paolo Bonzini <bonzini@gnu.org>
Sync from gcc:
@@ -16,6 +56,11 @@
* config.sub, config.guess: Update from upstream sources.
+2009-09-22 Loren J. Rittle <ljrittle@acm.org>
+
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Remove stray $$r/.
+ * Makefile.in: Rebuilt.
+
2009-09-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR bootstrap/32272
diff --git a/Makefile.def b/Makefile.def
index 5834232f..5541a67 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -97,7 +97,8 @@ host_modules= { module= ld; bootstrap=true; };
host_modules= { module= libcpp; bootstrap=true; };
host_modules= { module= libdecnumber; bootstrap=true; };
host_modules= { module= libgui; };
-host_modules= { module= libiberty; bootstrap=true; };
+host_modules= { module= libiberty; bootstrap=true;
+ extra_configure_flags='@extra_host_libiberty_configure_flags@';};
// We abuse missing to avoid installing anything for libiconv.
host_modules= { module= libiconv;
extra_configure_flags='--disable-shared';
@@ -141,6 +142,7 @@ host_modules= { module= libtermcap; no_check=true;
missing=maintainer-clean; };
host_modules= { module= utils; no_check=true; };
host_modules= { module= gnattools; };
+host_modules= { module= lto-plugin; bootstrap=true; };
target_modules = { module= libstdc++-v3;
bootstrap=true;
@@ -346,6 +348,8 @@ dependencies = { module=all-fixincludes; on=all-libiberty; };
dependencies = { module=all-gnattools; on=all-target-libada; };
+dependencies = { module=all-lto-plugin; on=all-libiberty; };
+
dependencies = { module=configure-mpfr; on=all-gmp; };
dependencies = { module=configure-mpc; on=all-mpfr; };
dependencies = { module=configure-ppl; on=all-gmp; };
@@ -424,6 +428,7 @@ dependencies = { module=all-gold; on=all-bfd; };
dependencies = { module=all-gold; on=all-build-bison; };
dependencies = { module=all-gold; on=all-build-byacc; };
dependencies = { module=check-gold; on=all-binutils; };
+dependencies = { module=check-gold; on=all-gas; };
dependencies = { module=configure-opcodes; on=configure-intl; };
dependencies = { module=all-opcodes; on=all-bfd; };
diff --git a/Makefile.in b/Makefile.in
index 044f849..afff42e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -219,6 +219,8 @@ HOST_EXPORTS = \
PPLINC="$(HOST_PPLINC)"; export PPLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
+ LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
+ LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
@if gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
@endif gcc-bootstrap
@@ -235,7 +237,7 @@ POSTSTAGE1_HOST_EXPORTS = \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
-I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
-I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
- -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+ -I$$s/libstdc++-v3/libsupc++ \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD; \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
@@ -293,6 +295,10 @@ HOST_PPLINC = @pplinc@
HOST_CLOOGLIBS = @clooglibs@
HOST_CLOOGINC = @clooginc@
+# Where to find libelf
+HOST_LIBELFLIBS = @libelflibs@
+HOST_LIBELFINC = @libelfinc@
+
# ----------------------------------------------
# Programs producing files for the BUILD machine
# ----------------------------------------------
@@ -854,7 +860,8 @@ configure-host: \
maybe-configure-tk \
maybe-configure-libtermcap \
maybe-configure-utils \
- maybe-configure-gnattools
+ maybe-configure-gnattools \
+ maybe-configure-lto-plugin
.PHONY: configure-target
configure-target: \
maybe-configure-target-libstdc++-v3 \
@@ -1026,6 +1033,9 @@ all-host: maybe-all-tk
all-host: maybe-all-libtermcap
all-host: maybe-all-utils
all-host: maybe-all-gnattools
+@if lto-plugin-no-bootstrap
+all-host: maybe-all-lto-plugin
+@endif lto-plugin-no-bootstrap
.PHONY: all-target
@@ -1147,6 +1157,7 @@ info-host: maybe-info-tk
info-host: maybe-info-libtermcap
info-host: maybe-info-utils
info-host: maybe-info-gnattools
+info-host: maybe-info-lto-plugin
.PHONY: info-target
@@ -1259,6 +1270,7 @@ dvi-host: maybe-dvi-tk
dvi-host: maybe-dvi-libtermcap
dvi-host: maybe-dvi-utils
dvi-host: maybe-dvi-gnattools
+dvi-host: maybe-dvi-lto-plugin
.PHONY: dvi-target
@@ -1371,6 +1383,7 @@ pdf-host: maybe-pdf-tk
pdf-host: maybe-pdf-libtermcap
pdf-host: maybe-pdf-utils
pdf-host: maybe-pdf-gnattools
+pdf-host: maybe-pdf-lto-plugin
.PHONY: pdf-target
@@ -1483,6 +1496,7 @@ html-host: maybe-html-tk
html-host: maybe-html-libtermcap
html-host: maybe-html-utils
html-host: maybe-html-gnattools
+html-host: maybe-html-lto-plugin
.PHONY: html-target
@@ -1595,6 +1609,7 @@ TAGS-host: maybe-TAGS-tk
TAGS-host: maybe-TAGS-libtermcap
TAGS-host: maybe-TAGS-utils
TAGS-host: maybe-TAGS-gnattools
+TAGS-host: maybe-TAGS-lto-plugin
.PHONY: TAGS-target
@@ -1707,6 +1722,7 @@ install-info-host: maybe-install-info-tk
install-info-host: maybe-install-info-libtermcap
install-info-host: maybe-install-info-utils
install-info-host: maybe-install-info-gnattools
+install-info-host: maybe-install-info-lto-plugin
.PHONY: install-info-target
@@ -1819,6 +1835,7 @@ install-pdf-host: maybe-install-pdf-tk
install-pdf-host: maybe-install-pdf-libtermcap
install-pdf-host: maybe-install-pdf-utils
install-pdf-host: maybe-install-pdf-gnattools
+install-pdf-host: maybe-install-pdf-lto-plugin
.PHONY: install-pdf-target
@@ -1931,6 +1948,7 @@ install-html-host: maybe-install-html-tk
install-html-host: maybe-install-html-libtermcap
install-html-host: maybe-install-html-utils
install-html-host: maybe-install-html-gnattools
+install-html-host: maybe-install-html-lto-plugin
.PHONY: install-html-target
@@ -2043,6 +2061,7 @@ installcheck-host: maybe-installcheck-tk
installcheck-host: maybe-installcheck-libtermcap
installcheck-host: maybe-installcheck-utils
installcheck-host: maybe-installcheck-gnattools
+installcheck-host: maybe-installcheck-lto-plugin
.PHONY: installcheck-target
@@ -2155,6 +2174,7 @@ mostlyclean-host: maybe-mostlyclean-tk
mostlyclean-host: maybe-mostlyclean-libtermcap
mostlyclean-host: maybe-mostlyclean-utils
mostlyclean-host: maybe-mostlyclean-gnattools
+mostlyclean-host: maybe-mostlyclean-lto-plugin
.PHONY: mostlyclean-target
@@ -2267,6 +2287,7 @@ clean-host: maybe-clean-tk
clean-host: maybe-clean-libtermcap
clean-host: maybe-clean-utils
clean-host: maybe-clean-gnattools
+clean-host: maybe-clean-lto-plugin
.PHONY: clean-target
@@ -2379,6 +2400,7 @@ distclean-host: maybe-distclean-tk
distclean-host: maybe-distclean-libtermcap
distclean-host: maybe-distclean-utils
distclean-host: maybe-distclean-gnattools
+distclean-host: maybe-distclean-lto-plugin
.PHONY: distclean-target
@@ -2491,6 +2513,7 @@ maintainer-clean-host: maybe-maintainer-clean-tk
maintainer-clean-host: maybe-maintainer-clean-libtermcap
maintainer-clean-host: maybe-maintainer-clean-utils
maintainer-clean-host: maybe-maintainer-clean-gnattools
+maintainer-clean-host: maybe-maintainer-clean-lto-plugin
.PHONY: maintainer-clean-target
@@ -2656,7 +2679,8 @@ check-host: \
maybe-check-tk \
maybe-check-libtermcap \
maybe-check-utils \
- maybe-check-gnattools
+ maybe-check-gnattools \
+ maybe-check-lto-plugin
.PHONY: check-target
check-target: \
@@ -2794,7 +2818,8 @@ install-host-nogcc: \
maybe-install-tk \
maybe-install-libtermcap \
maybe-install-utils \
- maybe-install-gnattools
+ maybe-install-gnattools \
+ maybe-install-lto-plugin
.PHONY: install-host
install-host: \
@@ -2873,7 +2898,8 @@ install-host: \
maybe-install-tk \
maybe-install-libtermcap \
maybe-install-utils \
- maybe-install-gnattools
+ maybe-install-gnattools \
+ maybe-install-lto-plugin
.PHONY: install-target
install-target: \
@@ -28249,7 +28275,7 @@ configure-libiberty:
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} $${srcdiroption} @extra_host_libiberty_configure_flags@ \
|| exit 1
@endif libiberty
@@ -28283,7 +28309,8 @@ configure-stage1-libiberty:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
- $(STAGE1_CONFIGURE_FLAGS)
+ $(STAGE1_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@
@endif libiberty-bootstrap
.PHONY: configure-stage2-libiberty maybe-configure-stage2-libiberty
@@ -28316,7 +28343,8 @@ configure-stage2-libiberty:
$(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_libiberty_configure_flags@
@endif libiberty-bootstrap
.PHONY: configure-stage3-libiberty maybe-configure-stage3-libiberty
@@ -28349,7 +28377,8 @@ configure-stage3-libiberty:
$(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_libiberty_configure_flags@
@endif libiberty-bootstrap
.PHONY: configure-stage4-libiberty maybe-configure-stage4-libiberty
@@ -28382,7 +28411,8 @@ configure-stage4-libiberty:
$(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_libiberty_configure_flags@
@endif libiberty-bootstrap
.PHONY: configure-stageprofile-libiberty maybe-configure-stageprofile-libiberty
@@ -28415,7 +28445,8 @@ configure-stageprofile-libiberty:
$(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_libiberty_configure_flags@
@endif libiberty-bootstrap
.PHONY: configure-stagefeedback-libiberty maybe-configure-stagefeedback-libiberty
@@ -28448,7 +28479,8 @@ configure-stagefeedback-libiberty:
$(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_libiberty_configure_flags@
@endif libiberty-bootstrap
@@ -42970,6 +43002,872 @@ maintainer-clean-gnattools:
+.PHONY: configure-lto-plugin maybe-configure-lto-plugin
+maybe-configure-lto-plugin:
+@if gcc-bootstrap
+configure-lto-plugin: stage_current
+@endif gcc-bootstrap
+@if lto-plugin
+maybe-configure-lto-plugin: configure-lto-plugin
+configure-lto-plugin:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/lto-plugin; \
+ cd "$(HOST_SUBDIR)/lto-plugin" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ || exit 1
+@endif lto-plugin
+
+
+
+.PHONY: configure-stage1-lto-plugin maybe-configure-stage1-lto-plugin
+maybe-configure-stage1-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-configure-stage1-lto-plugin: configure-stage1-lto-plugin
+configure-stage1-lto-plugin:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ $(STAGE1_CONFIGURE_FLAGS)
+@endif lto-plugin-bootstrap
+
+.PHONY: configure-stage2-lto-plugin maybe-configure-stage2-lto-plugin
+maybe-configure-stage2-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-configure-stage2-lto-plugin: configure-stage2-lto-plugin
+configure-stage2-lto-plugin:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS)
+@endif lto-plugin-bootstrap
+
+.PHONY: configure-stage3-lto-plugin maybe-configure-stage3-lto-plugin
+maybe-configure-stage3-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-configure-stage3-lto-plugin: configure-stage3-lto-plugin
+configure-stage3-lto-plugin:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS)
+@endif lto-plugin-bootstrap
+
+.PHONY: configure-stage4-lto-plugin maybe-configure-stage4-lto-plugin
+maybe-configure-stage4-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-configure-stage4-lto-plugin: configure-stage4-lto-plugin
+configure-stage4-lto-plugin:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS)
+@endif lto-plugin-bootstrap
+
+.PHONY: configure-stageprofile-lto-plugin maybe-configure-stageprofile-lto-plugin
+maybe-configure-stageprofile-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-configure-stageprofile-lto-plugin: configure-stageprofile-lto-plugin
+configure-stageprofile-lto-plugin:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEprofile_CFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS)
+@endif lto-plugin-bootstrap
+
+.PHONY: configure-stagefeedback-lto-plugin maybe-configure-stagefeedback-lto-plugin
+maybe-configure-stagefeedback-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-configure-stagefeedback-lto-plugin: configure-stagefeedback-lto-plugin
+configure-stagefeedback-lto-plugin:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEfeedback_CFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
+ libsrcdir="$$s/lto-plugin"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS)
+@endif lto-plugin-bootstrap
+
+
+
+
+
+.PHONY: all-lto-plugin maybe-all-lto-plugin
+maybe-all-lto-plugin:
+@if gcc-bootstrap
+all-lto-plugin: stage_current
+@endif gcc-bootstrap
+@if lto-plugin
+TARGET-lto-plugin=all
+maybe-all-lto-plugin: all-lto-plugin
+all-lto-plugin: configure-lto-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(TARGET-lto-plugin))
+@endif lto-plugin
+
+
+
+.PHONY: all-stage1-lto-plugin maybe-all-stage1-lto-plugin
+.PHONY: clean-stage1-lto-plugin maybe-clean-stage1-lto-plugin
+maybe-all-stage1-lto-plugin:
+maybe-clean-stage1-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-all-stage1-lto-plugin: all-stage1-lto-plugin
+all-stage1: all-stage1-lto-plugin
+TARGET-stage1-lto-plugin = $(TARGET-lto-plugin)
+all-stage1-lto-plugin: configure-stage1-lto-plugin
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ CXXFLAGS="$(STAGE1_CFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-lto-plugin)
+
+maybe-clean-stage1-lto-plugin: clean-stage1-lto-plugin
+clean-stage1: clean-stage1-lto-plugin
+clean-stage1-lto-plugin:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/lto-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-lto-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+@endif lto-plugin-bootstrap
+
+
+.PHONY: all-stage2-lto-plugin maybe-all-stage2-lto-plugin
+.PHONY: clean-stage2-lto-plugin maybe-clean-stage2-lto-plugin
+maybe-all-stage2-lto-plugin:
+maybe-clean-stage2-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-all-stage2-lto-plugin: all-stage2-lto-plugin
+all-stage2: all-stage2-lto-plugin
+TARGET-stage2-lto-plugin = $(TARGET-lto-plugin)
+all-stage2-lto-plugin: configure-stage2-lto-plugin
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" \
+ CXXFLAGS="$(STAGE2_CFLAGS)" \
+ LIBCFLAGS="$(STAGE2_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-lto-plugin)
+
+maybe-clean-stage2-lto-plugin: clean-stage2-lto-plugin
+clean-stage2: clean-stage2-lto-plugin
+clean-stage2-lto-plugin:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/lto-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-lto-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif lto-plugin-bootstrap
+
+
+.PHONY: all-stage3-lto-plugin maybe-all-stage3-lto-plugin
+.PHONY: clean-stage3-lto-plugin maybe-clean-stage3-lto-plugin
+maybe-all-stage3-lto-plugin:
+maybe-clean-stage3-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-all-stage3-lto-plugin: all-stage3-lto-plugin
+all-stage3: all-stage3-lto-plugin
+TARGET-stage3-lto-plugin = $(TARGET-lto-plugin)
+all-stage3-lto-plugin: configure-stage3-lto-plugin
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" \
+ CXXFLAGS="$(STAGE3_CFLAGS)" \
+ LIBCFLAGS="$(STAGE3_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-lto-plugin)
+
+maybe-clean-stage3-lto-plugin: clean-stage3-lto-plugin
+clean-stage3: clean-stage3-lto-plugin
+clean-stage3-lto-plugin:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/lto-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-lto-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif lto-plugin-bootstrap
+
+
+.PHONY: all-stage4-lto-plugin maybe-all-stage4-lto-plugin
+.PHONY: clean-stage4-lto-plugin maybe-clean-stage4-lto-plugin
+maybe-all-stage4-lto-plugin:
+maybe-clean-stage4-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-all-stage4-lto-plugin: all-stage4-lto-plugin
+all-stage4: all-stage4-lto-plugin
+TARGET-stage4-lto-plugin = $(TARGET-lto-plugin)
+all-stage4-lto-plugin: configure-stage4-lto-plugin
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" \
+ CXXFLAGS="$(STAGE4_CFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-lto-plugin)
+
+maybe-clean-stage4-lto-plugin: clean-stage4-lto-plugin
+clean-stage4: clean-stage4-lto-plugin
+clean-stage4-lto-plugin:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/lto-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-lto-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif lto-plugin-bootstrap
+
+
+.PHONY: all-stageprofile-lto-plugin maybe-all-stageprofile-lto-plugin
+.PHONY: clean-stageprofile-lto-plugin maybe-clean-stageprofile-lto-plugin
+maybe-all-stageprofile-lto-plugin:
+maybe-clean-stageprofile-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-all-stageprofile-lto-plugin: all-stageprofile-lto-plugin
+all-stageprofile: all-stageprofile-lto-plugin
+TARGET-stageprofile-lto-plugin = $(TARGET-lto-plugin)
+all-stageprofile-lto-plugin: configure-stageprofile-lto-plugin
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)" \
+ CXXFLAGS="$(STAGEprofile_CFLAGS)" \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-lto-plugin)
+
+maybe-clean-stageprofile-lto-plugin: clean-stageprofile-lto-plugin
+clean-stageprofile: clean-stageprofile-lto-plugin
+clean-stageprofile-lto-plugin:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/lto-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-lto-plugin/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif lto-plugin-bootstrap
+
+
+.PHONY: all-stagefeedback-lto-plugin maybe-all-stagefeedback-lto-plugin
+.PHONY: clean-stagefeedback-lto-plugin maybe-clean-stagefeedback-lto-plugin
+maybe-all-stagefeedback-lto-plugin:
+maybe-clean-stagefeedback-lto-plugin:
+@if lto-plugin-bootstrap
+maybe-all-stagefeedback-lto-plugin: all-stagefeedback-lto-plugin
+all-stagefeedback: all-stagefeedback-lto-plugin
+TARGET-stagefeedback-lto-plugin = $(TARGET-lto-plugin)
+all-stagefeedback-lto-plugin: configure-stagefeedback-lto-plugin
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CXXFLAGS="$(STAGEfeedback_CFLAGS)" \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-lto-plugin)
+
+maybe-clean-stagefeedback-lto-plugin: clean-stagefeedback-lto-plugin
+clean-stagefeedback: clean-stagefeedback-lto-plugin
+clean-stagefeedback-lto-plugin:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/lto-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-lto-plugin/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif lto-plugin-bootstrap
+
+
+
+
+
+.PHONY: check-lto-plugin maybe-check-lto-plugin
+maybe-check-lto-plugin:
+@if lto-plugin
+maybe-check-lto-plugin: check-lto-plugin
+
+check-lto-plugin:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif lto-plugin
+
+.PHONY: install-lto-plugin maybe-install-lto-plugin
+maybe-install-lto-plugin:
+@if lto-plugin
+maybe-install-lto-plugin: install-lto-plugin
+
+install-lto-plugin: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif lto-plugin
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-lto-plugin info-lto-plugin
+maybe-info-lto-plugin:
+@if lto-plugin
+maybe-info-lto-plugin: info-lto-plugin
+
+info-lto-plugin: \
+ configure-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-dvi-lto-plugin dvi-lto-plugin
+maybe-dvi-lto-plugin:
+@if lto-plugin
+maybe-dvi-lto-plugin: dvi-lto-plugin
+
+dvi-lto-plugin: \
+ configure-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-pdf-lto-plugin pdf-lto-plugin
+maybe-pdf-lto-plugin:
+@if lto-plugin
+maybe-pdf-lto-plugin: pdf-lto-plugin
+
+pdf-lto-plugin: \
+ configure-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-html-lto-plugin html-lto-plugin
+maybe-html-lto-plugin:
+@if lto-plugin
+maybe-html-lto-plugin: html-lto-plugin
+
+html-lto-plugin: \
+ configure-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-TAGS-lto-plugin TAGS-lto-plugin
+maybe-TAGS-lto-plugin:
+@if lto-plugin
+maybe-TAGS-lto-plugin: TAGS-lto-plugin
+
+TAGS-lto-plugin: \
+ configure-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-install-info-lto-plugin install-info-lto-plugin
+maybe-install-info-lto-plugin:
+@if lto-plugin
+maybe-install-info-lto-plugin: install-info-lto-plugin
+
+install-info-lto-plugin: \
+ configure-lto-plugin \
+ info-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-install-pdf-lto-plugin install-pdf-lto-plugin
+maybe-install-pdf-lto-plugin:
+@if lto-plugin
+maybe-install-pdf-lto-plugin: install-pdf-lto-plugin
+
+install-pdf-lto-plugin: \
+ configure-lto-plugin \
+ pdf-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-install-html-lto-plugin install-html-lto-plugin
+maybe-install-html-lto-plugin:
+@if lto-plugin
+maybe-install-html-lto-plugin: install-html-lto-plugin
+
+install-html-lto-plugin: \
+ configure-lto-plugin \
+ html-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-installcheck-lto-plugin installcheck-lto-plugin
+maybe-installcheck-lto-plugin:
+@if lto-plugin
+maybe-installcheck-lto-plugin: installcheck-lto-plugin
+
+installcheck-lto-plugin: \
+ configure-lto-plugin
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-mostlyclean-lto-plugin mostlyclean-lto-plugin
+maybe-mostlyclean-lto-plugin:
+@if lto-plugin
+maybe-mostlyclean-lto-plugin: mostlyclean-lto-plugin
+
+mostlyclean-lto-plugin:
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-clean-lto-plugin clean-lto-plugin
+maybe-clean-lto-plugin:
+@if lto-plugin
+maybe-clean-lto-plugin: clean-lto-plugin
+
+clean-lto-plugin:
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-distclean-lto-plugin distclean-lto-plugin
+maybe-distclean-lto-plugin:
+@if lto-plugin
+maybe-distclean-lto-plugin: distclean-lto-plugin
+
+distclean-lto-plugin:
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif lto-plugin
+
+.PHONY: maybe-maintainer-clean-lto-plugin maintainer-clean-lto-plugin
+maybe-maintainer-clean-lto-plugin:
+@if lto-plugin
+maybe-maintainer-clean-lto-plugin: maintainer-clean-lto-plugin
+
+maintainer-clean-lto-plugin:
+ @[ -f ./lto-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in lto-plugin" ; \
+ (cd $(HOST_SUBDIR)/lto-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif lto-plugin
+
+
+
# ---------------------------------------
# Modules which run on the target machine
# ---------------------------------------
@@ -53466,6 +54364,11 @@ stage1-start::
mkdir stage1-zlib; \
mv stage1-zlib zlib
@endif zlib
+@if lto-plugin
+ @cd $(HOST_SUBDIR); [ -d stage1-lto-plugin ] || \
+ mkdir stage1-lto-plugin; \
+ mv stage1-lto-plugin lto-plugin
+@endif lto-plugin
@[ -d stage1-$(TARGET_SUBDIR) ] || \
mkdir stage1-$(TARGET_SUBDIR); \
mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR)
@@ -53556,6 +54459,11 @@ stage1-end::
cd $(HOST_SUBDIR); mv zlib stage1-zlib ; \
fi
@endif zlib
+@if lto-plugin
+ @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage1-lto-plugin ; \
+ fi
+@endif lto-plugin
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \
fi
@@ -53706,6 +54614,12 @@ stage2-start::
mv stage2-zlib zlib ; \
mv stage1-zlib prev-zlib || test -f stage1-lean
@endif zlib
+@if lto-plugin
+ @cd $(HOST_SUBDIR); [ -d stage2-lto-plugin ] || \
+ mkdir stage2-lto-plugin; \
+ mv stage2-lto-plugin lto-plugin ; \
+ mv stage1-lto-plugin prev-lto-plugin || test -f stage1-lean
+@endif lto-plugin
@[ -d stage2-$(TARGET_SUBDIR) ] || \
mkdir stage2-$(TARGET_SUBDIR); \
mv stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
@@ -53814,6 +54728,12 @@ stage2-end::
mv prev-zlib stage1-zlib ; : ; \
fi
@endif zlib
+@if lto-plugin
+ @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage2-lto-plugin ; \
+ mv prev-lto-plugin stage1-lto-plugin ; : ; \
+ fi
+@endif lto-plugin
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; \
mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \
@@ -53988,6 +54908,12 @@ stage3-start::
mv stage3-zlib zlib ; \
mv stage2-zlib prev-zlib || test -f stage2-lean
@endif zlib
+@if lto-plugin
+ @cd $(HOST_SUBDIR); [ -d stage3-lto-plugin ] || \
+ mkdir stage3-lto-plugin; \
+ mv stage3-lto-plugin lto-plugin ; \
+ mv stage2-lto-plugin prev-lto-plugin || test -f stage2-lean
+@endif lto-plugin
@[ -d stage3-$(TARGET_SUBDIR) ] || \
mkdir stage3-$(TARGET_SUBDIR); \
mv stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
@@ -54096,6 +55022,12 @@ stage3-end::
mv prev-zlib stage2-zlib ; : ; \
fi
@endif zlib
+@if lto-plugin
+ @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage3-lto-plugin ; \
+ mv prev-lto-plugin stage2-lto-plugin ; : ; \
+ fi
+@endif lto-plugin
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; \
mv prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; : ; \
@@ -54326,6 +55258,12 @@ stage4-start::
mv stage4-zlib zlib ; \
mv stage3-zlib prev-zlib || test -f stage3-lean
@endif zlib
+@if lto-plugin
+ @cd $(HOST_SUBDIR); [ -d stage4-lto-plugin ] || \
+ mkdir stage4-lto-plugin; \
+ mv stage4-lto-plugin lto-plugin ; \
+ mv stage3-lto-plugin prev-lto-plugin || test -f stage3-lean
+@endif lto-plugin
@[ -d stage4-$(TARGET_SUBDIR) ] || \
mkdir stage4-$(TARGET_SUBDIR); \
mv stage4-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
@@ -54434,6 +55372,12 @@ stage4-end::
mv prev-zlib stage3-zlib ; : ; \
fi
@endif zlib
+@if lto-plugin
+ @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage4-lto-plugin ; \
+ mv prev-lto-plugin stage3-lto-plugin ; : ; \
+ fi
+@endif lto-plugin
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stage4-$(TARGET_SUBDIR) ; \
mv prev-$(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; : ; \
@@ -54652,6 +55596,12 @@ stageprofile-start::
mv stageprofile-zlib zlib ; \
mv stage1-zlib prev-zlib || test -f stage1-lean
@endif zlib
+@if lto-plugin
+ @cd $(HOST_SUBDIR); [ -d stageprofile-lto-plugin ] || \
+ mkdir stageprofile-lto-plugin; \
+ mv stageprofile-lto-plugin lto-plugin ; \
+ mv stage1-lto-plugin prev-lto-plugin || test -f stage1-lean
+@endif lto-plugin
@[ -d stageprofile-$(TARGET_SUBDIR) ] || \
mkdir stageprofile-$(TARGET_SUBDIR); \
mv stageprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
@@ -54760,6 +55710,12 @@ stageprofile-end::
mv prev-zlib stage1-zlib ; : ; \
fi
@endif zlib
+@if lto-plugin
+ @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stageprofile-lto-plugin ; \
+ mv prev-lto-plugin stage1-lto-plugin ; : ; \
+ fi
+@endif lto-plugin
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; \
mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \
@@ -54911,6 +55867,12 @@ stagefeedback-start::
mv stagefeedback-zlib zlib ; \
mv stageprofile-zlib prev-zlib || test -f stageprofile-lean
@endif zlib
+@if lto-plugin
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-lto-plugin ] || \
+ mkdir stagefeedback-lto-plugin; \
+ mv stagefeedback-lto-plugin lto-plugin ; \
+ mv stageprofile-lto-plugin prev-lto-plugin || test -f stageprofile-lean
+@endif lto-plugin
@[ -d stagefeedback-$(TARGET_SUBDIR) ] || \
mkdir stagefeedback-$(TARGET_SUBDIR); \
mv stagefeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
@@ -55019,6 +55981,12 @@ stagefeedback-end::
mv prev-zlib stageprofile-zlib ; : ; \
fi
@endif zlib
+@if lto-plugin
+ @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stagefeedback-lto-plugin ; \
+ mv prev-lto-plugin stageprofile-lto-plugin ; : ; \
+ fi
+@endif lto-plugin
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stagefeedback-$(TARGET_SUBDIR) ; \
mv prev-$(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; : ; \
@@ -55422,6 +56390,14 @@ all-stageprofile-libcpp: maybe-all-stageprofile-intl
all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
all-fixincludes: maybe-all-libiberty
all-gnattools: maybe-all-target-libada
+all-lto-plugin: maybe-all-libiberty
+
+all-stage1-lto-plugin: maybe-all-stage1-libiberty
+all-stage2-lto-plugin: maybe-all-stage2-libiberty
+all-stage3-lto-plugin: maybe-all-stage3-libiberty
+all-stage4-lto-plugin: maybe-all-stage4-libiberty
+all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty
+all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
configure-mpfr: maybe-all-gmp
configure-stage1-mpfr: maybe-all-stage1-gmp
@@ -55758,6 +56734,14 @@ check-stage3-gold: maybe-all-stage3-binutils
check-stage4-gold: maybe-all-stage4-binutils
check-stageprofile-gold: maybe-all-stageprofile-binutils
check-stagefeedback-gold: maybe-all-stagefeedback-binutils
+check-gold: maybe-all-gas
+
+check-stage1-gold: maybe-all-stage1-gas
+check-stage2-gold: maybe-all-stage2-gas
+check-stage3-gold: maybe-all-stage3-gas
+check-stage4-gold: maybe-all-stage4-gas
+check-stageprofile-gold: maybe-all-stageprofile-gas
+check-stagefeedback-gold: maybe-all-stagefeedback-gas
configure-opcodes: maybe-configure-intl
configure-stage1-opcodes: maybe-configure-stage1-intl
diff --git a/Makefile.tpl b/Makefile.tpl
index 6c63d95..45a58c5 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -222,6 +222,8 @@ HOST_EXPORTS = \
PPLINC="$(HOST_PPLINC)"; export PPLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
+ LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
+ LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
@if gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
@endif gcc-bootstrap
@@ -238,7 +240,7 @@ POSTSTAGE1_HOST_EXPORTS = \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
-I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
-I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
- -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+ -I$$s/libstdc++-v3/libsupc++ \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD; \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
@@ -296,6 +298,10 @@ HOST_PPLINC = @pplinc@
HOST_CLOOGLIBS = @clooglibs@
HOST_CLOOGINC = @clooginc@
+# Where to find libelf
+HOST_LIBELFLIBS = @libelflibs@
+HOST_LIBELFINC = @libelfinc@
+
# ----------------------------------------------
# Programs producing files for the BUILD machine
# ----------------------------------------------
diff --git a/configure b/configure
index 263b934..76084ed 100755
--- a/configure
+++ b/configure
@@ -553,6 +553,42 @@ PACKAGE_URL=
ac_unique_file="move-if-change"
enable_option_checking=no
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
ac_subst_vars='LTLIBOBJS
LIBOBJS
compare_exclusions
@@ -637,6 +673,12 @@ CFLAGS_FOR_TARGET
DEBUG_PREFIX_CFLAGS_FOR_TARGET
SYSROOT_CFLAGS_FOR_TARGET
stage1_languages
+extra_host_libiberty_configure_flags
+libelfinc
+libelflibs
+EGREP
+GREP
+CPP
clooginc
clooglibs
pplinc
@@ -764,6 +806,10 @@ with_cloog
with_cloog_include
with_cloog_lib
enable_cloog_version_check
+enable_lto
+with_libelf
+with_libelf_include
+with_libelf_lib
enable_stage1_languages
enable_objc_gc
with_build_sysroot
@@ -787,6 +833,7 @@ CPPFLAGS
CXX
CXXFLAGS
CCC
+CPP
AR
AS
DLLTOOL
@@ -1441,6 +1488,7 @@ Optional Features:
--enable-build-with-cxx build with C++ compiler instead of C compiler
--disable-ppl-version-check disable check for PPL version
--disable-cloog-version-check disable check for CLooG version
+ --enable-lto enable link time optimization support
--enable-stage1-languages[=all] choose additional languages to build during
stage1. Mostly useful for compiler development.
--enable-objc-gc enable use of Boehm's garbage collector with the
@@ -1495,6 +1543,11 @@ Optional Packages:
plus --with-cloog-lib=PATH/lib
--with-cloog-include=PATH Specify directory for installed CLooG include files
--with-cloog-lib=PATH Specify the directory for the installed CLooG library
+ --with-libelf=PATH Specify prefix directory for the installed libelf package
+ Equivalent to --with-libelf-include=PATH/include
+ plus --with-libelf-lib=PATH/lib
+ --with-libelf-include=PATH Specify directory for installed libelf include files
+ --with-libelf-lib=PATH Specify the directory for the installed libelf library
--with-build-sysroot=SYSROOT
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
@@ -1514,6 +1567,7 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
+ CPP C preprocessor
AR AR for the host
AS AS for the host
DLLTOOL DLLTOOL for the host
@@ -1760,6 +1814,203 @@ fi
return $ac_retval
} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -2768,6 +3019,13 @@ if test x$with_gnu_as = xno ; then
noconfigdirs="$noconfigdirs gas"
fi
+use_included_zlib=
+# Make sure we don't let ZLIB be added if we didn't want it.
+if test x$with_system_zlib = xyes ; then
+ use_included_zlib=no
+ noconfigdirs="$noconfigdirs zlib"
+fi
+
# some tools are so dependent upon X11 that if we're not building with X,
# it's not even worth trying to configure, much less build, that tool.
@@ -5667,6 +5925,602 @@ fi
+# Check for LTO support.
+# Check whether --enable-lto was given.
+if test "${enable_lto+set}" = set; then :
+ enableval=$enable_lto; enable_lto=$enableval
+else
+ enable_lto=yes; default_enable_lto=yes
+fi
+
+
+if test x"$enable_lto" = x"yes" ; then
+ # Make sure that libelf.h and gelf.h are available.
+
+# Check whether --with-libelf was given.
+if test "${with_libelf+set}" = set; then :
+ withval=$with_libelf;
+fi
+
+
+
+# Check whether --with-libelf_include was given.
+if test "${with_libelf_include+set}" = set; then :
+ withval=$with_libelf_include;
+fi
+
+
+
+# Check whether --with-libelf_lib was given.
+if test "${with_libelf_lib+set}" = set; then :
+ withval=$with_libelf_lib;
+fi
+
+
+ case $with_libelf in
+ "")
+ libelflibs="-lelf"
+ libelfinc="-I/usr/include/libelf"
+ ;;
+ *)
+ libelflibs="-L$with_libelf/lib -lelf"
+ libelfinc="-I$with_libelf/include -I$with_libelf/include/libelf"
+ LIBS="$libelflibs $LIBS"
+ ;;
+ esac
+
+ if test "x$with_libelf_include" != x; then
+ libelfinc="-I$with_libelf_include"
+ fi
+
+ if test "x$with_libelf_lib" != x; then
+ libelflibs="-L$with_libelf_lib -lelf"
+ LIBS="$libelflibs $LIBS"
+ fi
+
+ if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \
+ && test -d ${srcdir}/libelf; then
+ libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/.libs -L$$r/$(HOST_SUBDIR)/libelf/_libs -lelf '
+ libelfinc='-I$$r/$(HOST_SUBDIR)/libelf/include -I$$s/libelf/include'
+ LIBS="$libelflibs $LIBS"
+ fi
+
+ saved_CFLAGS="$CFLAGS"
+ saved_CPPFLAGS="$CPPFLAGS"
+ saved_LIBS="$LIBS"
+
+ CFLAGS="$CFLAGS $libelfinc"
+ CPPFLAGS="$CPPFLAGS $libelfinc"
+ LIBS="$LIBS $libelflibs"
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in libelf.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
+if test "x$ac_cv_header_libelf_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBELF_H 1
+_ACEOF
+ have_libelf_h=yes
+fi
+
+done
+
+ for ac_header in gelf.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "gelf.h" "ac_cv_header_gelf_h" "$ac_includes_default"
+if test "x$ac_cv_header_gelf_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GELF_H 1
+_ACEOF
+ have_gelf_h=yes
+fi
+
+done
+
+
+ for ac_header in libelf/libelf.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libelf/libelf.h" "ac_cv_header_libelf_libelf_h" "$ac_includes_default"
+if test "x$ac_cv_header_libelf_libelf_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBELF_LIBELF_H 1
+_ACEOF
+ have_libelf_libelf_h=yes
+fi
+
+done
+
+ for ac_header in libelf/gelf.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libelf/gelf.h" "ac_cv_header_libelf_gelf_h" "$ac_includes_default"
+if test "x$ac_cv_header_libelf_gelf_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBELF_GELF_H 1
+_ACEOF
+ have_libelf_gelf_h=yes
+fi
+
+done
+
+
+ # If we couldn't find libelf.h and the user forced it, emit an error.
+ if test x"$have_libelf_h" != x"yes" \
+ && test x"$have_libelf_libelf_h" != x"yes" ; then
+ if test x"$default_enable_lto" != x"yes" ; then
+ as_fn_error "LTO support requires libelf.h or libelf/libelf.h." "$LINENO" 5
+ else
+ enable_lto=no
+ libelflibs=
+ libelfinc=
+ fi
+ fi
+
+ # If we couldn't find gelf.h and the user forced it, emit an error.
+ if test x"$have_gelf_h" != x"yes" \
+ && test x"$have_libelf_gelf_h" != x"yes" ; then
+ if test x"$default_enable_lto" != x"yes" ; then
+ as_fn_error "LTO support requires gelf.h or libelf/gelf.h." "$LINENO" 5
+ else
+ enable_lto=no
+ libelflibs=
+ libelfinc=
+ fi
+ fi
+
+ # Check that the detected libelf has the functions we need. We cannot
+ # rely on just detecting the headers since they do not include
+ # versioning information. Add functions, if needed.
+ if test x"$enable_lto" = x"yes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of libelf" >&5
+$as_echo_n "checking for the correct version of libelf... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libelf.h>
+int
+main ()
+{
+
+ elf_errmsg (0);
+ elf_getscn (0, 0);
+ elf_nextscn (0, 0);
+ elf_strptr (0, 0, 0);
+ elf_getident (0, 0);
+ elf_getshdrstrndx (0, 0);
+ elf_begin (0, 0, 0);
+ elf_ndxscn (0);
+ elf_end (0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; };
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }; enable_lto=no; libelflibs= ; libelfinc=
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ # If we couldn't enable LTO and the user forced it, emit an error.
+ if test x"$enable_lto" = x"no" \
+ && test x"$default_enable_lto" != x"yes" ; then
+ as_fn_error "To enable LTO, GCC requires libelf v0.8.12+.
+Try the --with-libelf, --with-libelf-include and --with-libelf-lib options
+to specify its location." "$LINENO" 5
+ fi
+ fi
+
+ CFLAGS="$saved_CFLAGS"
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+
+ # Flags needed for libelf.
+
+
+fi
+
# By default, C is the only stage 1 language.
stage1_languages=,c,
@@ -5735,6 +6589,18 @@ if test -d ${srcdir}/gcc; then
done
new_enable_languages=,c,
+
+ # If LTO is enabled, add the LTO front end.
+ extra_host_libiberty_configure_flags=
+ if test "$enable_lto" = "yes" ; then
+ new_enable_languages="${new_enable_languages}lto,"
+ if test "${ENABLE_GOLD}" = "yes" ; then
+ configdirs="$configdirs lto-plugin"
+ extra_host_libiberty_configure_flags=--enable-shared
+ fi
+ fi
+
+
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
@@ -6197,7 +7063,7 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
fi
fi
-# Set with_gnu_as and with_gnu_ld as appropriate.
+# Set with_gnu_as, with_gnu_ld, and with_system_zlib as appropriate.
#
# This is done by determining whether or not the appropriate directory
# is available, and by checking whether or not specific configurations
@@ -6208,7 +7074,9 @@ fi
#
# If the default for a toolchain is to use GNU as and ld, and you don't
# want to do that, then you should use the --without-gnu-as and
-# --without-gnu-ld options for the configure script.
+# --without-gnu-ld options for the configure script. Similarly, if
+# the default is to use the included zlib and you don't want to do that,
+# you should use the --with-system-zlib option for the configure script.
if test x${use_gnu_as} = x &&
echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
@@ -6222,6 +7090,14 @@ if test x${use_gnu_ld} = x &&
extra_host_args="$extra_host_args --with-gnu-ld"
fi
+if test x${use_included_zlib} = x &&
+ echo " ${configdirs} " | grep " zlib " > /dev/null 2>&1 ; then
+ :
+else
+ with_system_zlib=yes
+ extra_host_args="$extra_host_args --with-system-zlib"
+fi
+
# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
# can detect this case.
diff --git a/configure.ac b/configure.ac
index 0e68f43..c961fe8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -260,6 +260,13 @@ if test x$with_gnu_as = xno ; then
noconfigdirs="$noconfigdirs gas"
fi
+use_included_zlib=
+# Make sure we don't let ZLIB be added if we didn't want it.
+if test x$with_system_zlib = xyes ; then
+ use_included_zlib=no
+ noconfigdirs="$noconfigdirs zlib"
+fi
+
# some tools are so dependent upon X11 that if we're not building with X,
# it's not even worth trying to configure, much less build, that tool.
@@ -1611,6 +1618,127 @@ fi
AC_SUBST(clooglibs)
AC_SUBST(clooginc)
+# Check for LTO support.
+AC_ARG_ENABLE(lto,
+[ --enable-lto enable link time optimization support],
+enable_lto=$enableval,
+enable_lto=yes; default_enable_lto=yes)
+
+if test x"$enable_lto" = x"yes" ; then
+ # Make sure that libelf.h and gelf.h are available.
+ AC_ARG_WITH(libelf, [ --with-libelf=PATH Specify prefix directory for the installed libelf package
+ Equivalent to --with-libelf-include=PATH/include
+ plus --with-libelf-lib=PATH/lib])
+
+ AC_ARG_WITH(libelf_include, [ --with-libelf-include=PATH Specify directory for installed libelf include files])
+
+ AC_ARG_WITH(libelf_lib, [ --with-libelf-lib=PATH Specify the directory for the installed libelf library])
+
+ case $with_libelf in
+ "")
+ libelflibs="-lelf"
+ libelfinc="-I/usr/include/libelf"
+ ;;
+ *)
+ libelflibs="-L$with_libelf/lib -lelf"
+ libelfinc="-I$with_libelf/include -I$with_libelf/include/libelf"
+ LIBS="$libelflibs $LIBS"
+ ;;
+ esac
+
+ if test "x$with_libelf_include" != x; then
+ libelfinc="-I$with_libelf_include"
+ fi
+
+ if test "x$with_libelf_lib" != x; then
+ libelflibs="-L$with_libelf_lib -lelf"
+ LIBS="$libelflibs $LIBS"
+ fi
+
+ if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \
+ && test -d ${srcdir}/libelf; then
+ libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/.libs -L$$r/$(HOST_SUBDIR)/libelf/_libs -lelf '
+ libelfinc='-I$$r/$(HOST_SUBDIR)/libelf/include -I$$s/libelf/include'
+ LIBS="$libelflibs $LIBS"
+ fi
+
+ saved_CFLAGS="$CFLAGS"
+ saved_CPPFLAGS="$CPPFLAGS"
+ saved_LIBS="$LIBS"
+
+ CFLAGS="$CFLAGS $libelfinc"
+ CPPFLAGS="$CPPFLAGS $libelfinc"
+ LIBS="$LIBS $libelflibs"
+
+ AC_CHECK_HEADERS(libelf.h, [have_libelf_h=yes])
+ AC_CHECK_HEADERS(gelf.h, [have_gelf_h=yes])
+
+ AC_CHECK_HEADERS(libelf/libelf.h, [have_libelf_libelf_h=yes])
+ AC_CHECK_HEADERS(libelf/gelf.h, [have_libelf_gelf_h=yes])
+
+ # If we couldn't find libelf.h and the user forced it, emit an error.
+ if test x"$have_libelf_h" != x"yes" \
+ && test x"$have_libelf_libelf_h" != x"yes" ; then
+ if test x"$default_enable_lto" != x"yes" ; then
+ AC_MSG_ERROR([LTO support requires libelf.h or libelf/libelf.h.])
+ else
+ enable_lto=no
+ libelflibs=
+ libelfinc=
+ fi
+ fi
+
+ # If we couldn't find gelf.h and the user forced it, emit an error.
+ if test x"$have_gelf_h" != x"yes" \
+ && test x"$have_libelf_gelf_h" != x"yes" ; then
+ if test x"$default_enable_lto" != x"yes" ; then
+ AC_MSG_ERROR([LTO support requires gelf.h or libelf/gelf.h.])
+ else
+ enable_lto=no
+ libelflibs=
+ libelfinc=
+ fi
+ fi
+
+ # Check that the detected libelf has the functions we need. We cannot
+ # rely on just detecting the headers since they do not include
+ # versioning information. Add functions, if needed.
+ if test x"$enable_lto" = x"yes" ; then
+ AC_MSG_CHECKING([for the correct version of libelf])
+ AC_TRY_LINK(
+ [#include <libelf.h>],[
+ elf_errmsg (0);
+ elf_getscn (0, 0);
+ elf_nextscn (0, 0);
+ elf_strptr (0, 0, 0);
+ elf_getident (0, 0);
+ elf_getshdrstrndx (0, 0);
+ elf_begin (0, 0, 0);
+ elf_ndxscn (0);
+ elf_end (0);
+ ],
+ [AC_MSG_RESULT([yes]);],
+ [AC_MSG_RESULT([no]); enable_lto=no; libelflibs= ; libelfinc= ]
+ )
+
+ # If we couldn't enable LTO and the user forced it, emit an error.
+ if test x"$enable_lto" = x"no" \
+ && test x"$default_enable_lto" != x"yes" ; then
+ AC_MSG_ERROR([To enable LTO, GCC requires libelf v0.8.12+.
+Try the --with-libelf, --with-libelf-include and --with-libelf-lib options
+to specify its location.])
+ fi
+ fi
+
+ CFLAGS="$saved_CFLAGS"
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+
+ # Flags needed for libelf.
+ AC_SUBST(libelflibs)
+ AC_SUBST(libelfinc)
+fi
+
# By default, C is the only stage 1 language.
stage1_languages=,c,
@@ -1679,6 +1807,18 @@ if test -d ${srcdir}/gcc; then
done
new_enable_languages=,c,
+
+ # If LTO is enabled, add the LTO front end.
+ extra_host_libiberty_configure_flags=
+ if test "$enable_lto" = "yes" ; then
+ new_enable_languages="${new_enable_languages}lto,"
+ if test "${ENABLE_GOLD}" = "yes" ; then
+ configdirs="$configdirs lto-plugin"
+ extra_host_libiberty_configure_flags=--enable-shared
+ fi
+ fi
+ AC_SUBST(extra_host_libiberty_configure_flags)
+
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
@@ -2088,7 +2228,7 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
fi
fi
-# Set with_gnu_as and with_gnu_ld as appropriate.
+# Set with_gnu_as, with_gnu_ld, and with_system_zlib as appropriate.
#
# This is done by determining whether or not the appropriate directory
# is available, and by checking whether or not specific configurations
@@ -2099,7 +2239,9 @@ fi
#
# If the default for a toolchain is to use GNU as and ld, and you don't
# want to do that, then you should use the --without-gnu-as and
-# --without-gnu-ld options for the configure script.
+# --without-gnu-ld options for the configure script. Similarly, if
+# the default is to use the included zlib and you don't want to do that,
+# you should use the --with-system-zlib option for the configure script.
if test x${use_gnu_as} = x &&
echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
@@ -2113,6 +2255,14 @@ if test x${use_gnu_ld} = x &&
extra_host_args="$extra_host_args --with-gnu-ld"
fi
+if test x${use_included_zlib} = x &&
+ echo " ${configdirs} " | grep " zlib " > /dev/null 2>&1 ; then
+ :
+else
+ with_system_zlib=yes
+ extra_host_args="$extra_host_args --with-system-zlib"
+fi
+
# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
# can detect this case.