+# Other targets (dvi, info, etc.)
+
+.PHONY: maybe-info-gcc info-gcc
+maybe-info-gcc:
+@if gcc
+maybe-info-gcc: info-gcc
+info-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing info in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-dvi-gcc dvi-gcc
+maybe-dvi-gcc:
+@if gcc
+maybe-dvi-gcc: dvi-gcc
+dvi-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing dvi in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-TAGS-gcc TAGS-gcc
+maybe-TAGS-gcc:
+@if gcc
+maybe-TAGS-gcc: TAGS-gcc
+TAGS-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing TAGS in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-install-info-gcc install-info-gcc
+maybe-install-info-gcc:
+@if gcc
+maybe-install-info-gcc: install-info-gcc
+install-info-gcc: \
+ configure-gcc \
+ info-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing install-info in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-installcheck-gcc installcheck-gcc
+maybe-installcheck-gcc:
+@if gcc
+maybe-installcheck-gcc: installcheck-gcc
+installcheck-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing installcheck in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
+maybe-mostlyclean-gcc:
+@if gcc
+maybe-mostlyclean-gcc: mostlyclean-gcc
+mostlyclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing mostlyclean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-clean-gcc clean-gcc
+maybe-clean-gcc:
+@if gcc
+maybe-clean-gcc: clean-gcc
+clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing clean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-distclean-gcc distclean-gcc
+maybe-distclean-gcc:
+@if gcc
+maybe-distclean-gcc: distclean-gcc
+distclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing distclean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+@endif gcc
+
+
+.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
+maybe-maintainer-clean-gcc:
+@if gcc
+maybe-maintainer-clean-gcc: maintainer-clean-gcc
+maintainer-clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ $(HOST_EXPORTS) \
+ echo "Doing maintainer-clean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+@endif gcc
+
+
+
+@if gcc-bootstrap
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# We track the current stage (the one in 'gcc') in the stage_last file.
+# We name the build directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
+
+# Since the 'compare' process will fail (on debugging information) if any
+# directory names are different, we need to link the gcc directory for
+# the previous stage to a constant name ('gcc-prev'), and to make the name of
+# the build directories constant as well. For the latter, we use naked names
+# like 'gcc', because the scripts in that directory assume it. We use
+# mv on platforms where symlinks to directories do not work or are not
+# reliable.
+
+# At the end of the bootstrap, a symlink to 'stage3-gcc' named 'gcc' must
+# be kept, so that libraries can find it. Ick!
+
+# It would be best to preinstall gcc into a staging area (and in the
+# future, gather there all prebootstrap packages). This would allow
+# assemblers and linkers can be bootstrapped as well as the compiler
+# (both in a combined tree, or separately). This however requires some
+# change to the gcc driver, again in order to avoid comparison failures.
+
+# Bugs: This is almost certainly not parallel-make safe.
+
+# 'touch' doesn't work right on some platforms.
+STAMP = echo timestamp >
+
+# Only build the C compiler for stage1, because that is the only one that
+# we can guarantee will build with the native compiler, and also it is the
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+STAGE1_CFLAGS=@stage1_cflags@
+STAGE1_LANGUAGES=@stage1_languages@
+
+# We only want to compare .o files, so set this!
+objext = .o
+
+# Real targets act phony if they depend on phony targets; this hack
+# prevents gratuitous rebuilding of stage 1.
+prebootstrap:
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-bootstrap
+ $(STAMP) prebootstrap
+
+# Flags to pass to stage2 and later makes.
+BOOT_CFLAGS= -g -O2
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ STAGE_PREFIX=$$r/stage-gcc/ \
+ CFLAGS="$(BOOT_CFLAGS)" \
+ ADAC="\$$(CC)"
+
+# For stage 1:
+# * We force-disable intermodule optimizations, even if
+# --enable-intermodule was passed, since the installed compiler probably
+# can't handle them. Luckily, autoconf always respects
+# the last argument when conflicting --enable arguments are passed.
+# * Likewise, we force-disable coverage flags, since the installed compiler
+# probably has never heard of them.
+# * We build only C (and possibly Ada).
+
+
+.PHONY: stage1-start stage1-end
+
+stage1-start::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ echo stage1 > stage_last ; \
+ [ -d stage1-gcc ] || mkdir stage1-gcc; \
+ set stage1-gcc gcc ; @CREATE_LINK_TO_DIR@
+
+stage1-end::
+ rm -f stage_last ; \
+ set gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+
+# Bubble a bugfix through all the stages up to stage 1. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage1-bubble
+stage1-bubble::
+ @if [ -f all-stage1-gcc ] ; then \
+ echo Remaking stage 1 ; \
+ rm -f all-stage1-gcc ; \
+ fi ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage1-gcc
+
+
+
+configure-stage1-gcc: prebootstrap
+ $(MAKE) stage1-start
+ @if [ -f stage1-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage1-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" && \
+ $(STAMP) ../configure-stage1-gcc
+
+all-stage1-gcc: configure-stage1-gcc
+ $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" && $(STAMP) ../all-stage1-gcc
+
+
+
+
+
+.PHONY: restage1 touch-stage1 distclean-stage1
+
+# Rules to wipe a stage and all the following ones, used for cleanstrap
+
+distclean-stage1::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ rm -rf configure-stage1-gcc all-stage1-gcc stage1-gcc
+
+# Rules to renew the timestamp on a stage and all the following ones
+
+touch-stage1::
+ @[ -f configure-stage1-gcc ] && \
+ echo '$(STAMP) configure-stage1-gcc' && \
+ $(STAMP) configure-stage1-gcc; \
+ [ -f all-stage1-gcc ] && \
+ echo '$(STAMP) all-stage1-gcc' && \
+ $(STAMP) all-stage1-gcc; \
+ :
+
+# After building a stage, touch the following ones
+
+restage1::
+ rm -rf all-stage1-gcc
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage1-gcc
+
+
+
+
+.PHONY: stage2-start stage2-end
+
+stage2-start::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ echo stage2 > stage_last ; \
+ [ -d stage2-gcc ] || mkdir stage2-gcc; \
+ set stage2-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+
+stage2-end::
+ rm -f stage_last ; \
+ set gcc stage2-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+
+# Bubble a bugfix through all the stages up to stage 2. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage2-bubble
+stage2-bubble:: stage1-bubble
+ @if [ -f all-stage2-gcc ] ; then \
+ echo Remaking stage 2 ; \
+ rm -f all-stage2-gcc ; \
+ fi ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage2-gcc
+
+
+stage1-bubble::
+ @if [ -f configure-stage2-gcc ] ; then \
+ $(STAMP) configure-stage2-gcc ; \
+ fi
+
+
+configure-stage2-gcc: all-stage1-gcc
+ $(MAKE) stage2-start
+ @if [ -f stage2-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage2-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@ && \
+ $(STAMP) ../configure-stage2-gcc
+
+all-stage2-gcc: configure-stage2-gcc
+ $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ && $(STAMP) ../all-stage2-gcc
+
+
+
+
+.PHONY: bootstrap2
+bootstrap2:
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage2-bubble \
+ stage2-start all stage2-end
+
+
+.PHONY: restage2 touch-stage2 distclean-stage2
+
+# Rules to wipe a stage and all the following ones, used for cleanstrap
+distclean-stage1:: distclean-stage2
+distclean-stage2::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ rm -rf configure-stage2-gcc all-stage2-gcc stage2-gcc
+
+# Rules to renew the timestamp on a stage and all the following ones
+touch-stage1:: touch-stage2
+touch-stage2::
+ @[ -f configure-stage2-gcc ] && \
+ echo '$(STAMP) configure-stage2-gcc' && \
+ $(STAMP) configure-stage2-gcc; \
+ [ -f all-stage2-gcc ] && \
+ echo '$(STAMP) all-stage2-gcc' && \
+ $(STAMP) all-stage2-gcc; \
+ :
+
+# After building a stage, touch the following ones
+restage1:: touch-stage2
+restage2::
+ rm -rf all-stage2-gcc
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage2-gcc
+
+
+
+
+.PHONY: stage3-start stage3-end
+
+stage3-start::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ echo stage3 > stage_last ; \
+ [ -d stage3-gcc ] || mkdir stage3-gcc; \
+ set stage3-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+
+stage3-end::
+ rm -f stage_last ; \
+ set gcc stage3-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage2-gcc ; @UNDO_LINK_TO_DIR@
+
+# Bubble a bugfix through all the stages up to stage 3. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage3-bubble
+stage3-bubble:: stage2-bubble
+ @if [ -f all-stage3-gcc ] ; then \
+ echo Remaking stage 3 ; \
+ rm -f all-stage3-gcc ; \
+ fi ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3-gcc
+
+
+stage2-bubble::
+ @if [ -f configure-stage3-gcc ] ; then \
+ $(STAMP) configure-stage3-gcc ; \
+ fi
+
+
+configure-stage3-gcc: all-stage2-gcc
+ $(MAKE) stage3-start
+ @if [ -f stage3-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage3-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@ && \
+ $(STAMP) ../configure-stage3-gcc
+
+all-stage3-gcc: configure-stage3-gcc
+ $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ && $(STAMP) ../all-stage3-gcc
+
+
+compare: all-stage3-gcc
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ rm -f .bad_compare ; \
+ cd stage3-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage2-gcc/$$file; f2=$$r/stage3-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ true; \
+ fi ; \
+ $(STAMP) compare
+
+
+
+.PHONY: bootstrap
+bootstrap:
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage3-bubble compare \
+ stage3-start all stage3-end
+
+
+.PHONY: restage3 touch-stage3 distclean-stage3
+
+# Rules to wipe a stage and all the following ones, used for cleanstrap
+distclean-stage2:: distclean-stage3
+distclean-stage3::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ rm -rf configure-stage3-gcc all-stage3-gcc stage3-gcc compare
+
+# Rules to renew the timestamp on a stage and all the following ones
+touch-stage2:: touch-stage3
+touch-stage3::
+ @[ -f configure-stage3-gcc ] && \
+ echo '$(STAMP) configure-stage3-gcc' && \
+ $(STAMP) configure-stage3-gcc; \
+ [ -f all-stage3-gcc ] && \
+ echo '$(STAMP) all-stage3-gcc' && \
+ $(STAMP) all-stage3-gcc; \
+ :
+
+# After building a stage, touch the following ones
+restage2:: touch-stage3
+restage3::
+ rm -rf all-stage3-gcc compare
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare
+
+
+.PHONY: cleanstrap
+cleanstrap: distclean-stage1 bootstrap
+
+
+
+.PHONY: stage4-start stage4-end
+
+stage4-start::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ echo stage4 > stage_last ; \
+ [ -d stage4-gcc ] || mkdir stage4-gcc; \
+ set stage4-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+
+stage4-end::
+ rm -f stage_last ; \
+ set gcc stage4-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage3-gcc ; @UNDO_LINK_TO_DIR@
+
+# Bubble a bugfix through all the stages up to stage 4. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage4-bubble
+stage4-bubble:: stage3-bubble
+ @if [ -f all-stage4-gcc ] ; then \
+ echo Remaking stage 4 ; \
+ rm -f all-stage4-gcc ; \
+ fi ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4-gcc
+
+
+stage3-bubble::
+ @if [ -f configure-stage4-gcc ] ; then \
+ $(STAMP) configure-stage4-gcc ; \
+ fi
+
+
+configure-stage4-gcc: all-stage3-gcc
+ $(MAKE) stage4-start
+ @if [ -f stage4-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage4-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@ && \
+ $(STAMP) ../configure-stage4-gcc
+
+all-stage4-gcc: configure-stage4-gcc
+ $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ && $(STAMP) ../all-stage4-gcc
+
+
+compare3: all-stage4-gcc
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ rm -f .bad_compare ; \
+ cd stage4-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage3-gcc/$$file; f2=$$r/stage4-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ true; \
+ fi ; \
+ $(STAMP) compare3
+
+
+
+.PHONY: bootstrap4
+bootstrap4:
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage4-bubble compare3 \
+ stage4-start all stage4-end
+
+
+.PHONY: restage4 touch-stage4 distclean-stage4
+
+# Rules to wipe a stage and all the following ones, used for cleanstrap
+distclean-stage3:: distclean-stage4
+distclean-stage4::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ rm -rf configure-stage4-gcc all-stage4-gcc stage4-gcc compare3
+
+# Rules to renew the timestamp on a stage and all the following ones
+touch-stage3:: touch-stage4
+touch-stage4::
+ @[ -f configure-stage4-gcc ] && \
+ echo '$(STAMP) configure-stage4-gcc' && \
+ $(STAMP) configure-stage4-gcc; \
+ [ -f all-stage4-gcc ] && \
+ echo '$(STAMP) all-stage4-gcc' && \
+ $(STAMP) all-stage4-gcc; \
+ :
+
+# After building a stage, touch the following ones
+restage3:: touch-stage4
+restage4::
+ rm -rf all-stage4-gcc compare3
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare3
+
+
+
+
+.PHONY: stageprofile-start stageprofile-end
+
+stageprofile-start::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ echo stageprofile > stage_last ; \
+ [ -d stageprofile-gcc ] || mkdir stageprofile-gcc; \
+ set stageprofile-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+
+stageprofile-end::
+ rm -f stage_last ; \
+ set gcc stageprofile-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+
+# Bubble a bugfix through all the stages up to stage profile. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stageprofile-bubble
+stageprofile-bubble:: stage1-bubble
+ @if [ -f all-stageprofile-gcc ] ; then \
+ echo Remaking stage profile ; \
+ rm -f all-stageprofile-gcc ; \
+ fi ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stageprofile-gcc
+
+
+stage1-bubble::
+ @if [ -f configure-stageprofile-gcc ] ; then \
+ $(STAMP) configure-stageprofile-gcc ; \
+ fi
+
+
+configure-stageprofile-gcc: all-stage1-gcc
+ $(MAKE) stageprofile-start
+ @if [ -f stageprofile-gcc/Makefile ] ; then \
+ $(STAMP) configure-stageprofile-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@ && \
+ $(STAMP) ../configure-stageprofile-gcc
+
+all-stageprofile-gcc: configure-stageprofile-gcc
+ $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" && $(STAMP) ../all-stageprofile-gcc
+
+
+
+
+
+.PHONY: restageprofile touch-stageprofile distclean-stageprofile
+
+# Rules to wipe a stage and all the following ones, used for cleanstrap
+distclean-stage1:: distclean-stageprofile
+distclean-stageprofile::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ rm -rf configure-stageprofile-gcc all-stageprofile-gcc stageprofile-gcc
+
+# Rules to renew the timestamp on a stage and all the following ones
+touch-stage1:: touch-stageprofile
+touch-stageprofile::
+ @[ -f configure-stageprofile-gcc ] && \
+ echo '$(STAMP) configure-stageprofile-gcc' && \
+ $(STAMP) configure-stageprofile-gcc; \
+ [ -f all-stageprofile-gcc ] && \
+ echo '$(STAMP) all-stageprofile-gcc' && \
+ $(STAMP) all-stageprofile-gcc; \
+ :
+
+# After building a stage, touch the following ones
+restage1:: touch-stageprofile
+restageprofile::
+ rm -rf all-stageprofile-gcc
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stageprofile-gcc
+
+
+
+
+.PHONY: stagefeedback-start stagefeedback-end
+
+stagefeedback-start::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ echo stagefeedback > stage_last ; \
+ [ -d stagefeedback-gcc ] || mkdir stagefeedback-gcc; \
+ set stagefeedback-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+
+stagefeedback-end::
+ rm -f stage_last ; \
+ set gcc stagefeedback-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+
+# Bubble a bugfix through all the stages up to stage feedback. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stagefeedback-bubble
+stagefeedback-bubble:: stage1-bubble
+ @if [ -f all-stagefeedback-gcc ] ; then \
+ echo Remaking stage feedback ; \
+ rm -f all-stagefeedback-gcc ; \
+ fi ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stagefeedback-gcc
+
+
+stage1-bubble::
+ @if [ -f configure-stagefeedback-gcc ] ; then \
+ $(STAMP) configure-stagefeedback-gcc ; \
+ fi
+
+
+configure-stagefeedback-gcc: all-stage1-gcc
+ $(MAKE) stagefeedback-start
+ @if [ -f stagefeedback-gcc/Makefile ] ; then \
+ $(STAMP) configure-stagefeedback-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@ && \
+ $(STAMP) ../configure-stagefeedback-gcc
+
+all-stagefeedback-gcc: configure-stagefeedback-gcc
+ $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" && $(STAMP) ../all-stagefeedback-gcc
+
+
+
+
+
+.PHONY: restagefeedback touch-stagefeedback distclean-stagefeedback
+
+# Rules to wipe a stage and all the following ones, used for cleanstrap
+distclean-stage1:: distclean-stagefeedback
+distclean-stagefeedback::
+ [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+ rm -rf configure-stagefeedback-gcc all-stagefeedback-gcc stagefeedback-gcc
+
+# Rules to renew the timestamp on a stage and all the following ones
+touch-stage1:: touch-stagefeedback
+touch-stagefeedback::
+ @[ -f configure-stagefeedback-gcc ] && \
+ echo '$(STAMP) configure-stagefeedback-gcc' && \
+ $(STAMP) configure-stagefeedback-gcc; \
+ [ -f all-stagefeedback-gcc ] && \
+ echo '$(STAMP) all-stagefeedback-gcc' && \
+ $(STAMP) all-stagefeedback-gcc; \
+ :
+
+# After building a stage, touch the following ones
+restage1:: touch-stagefeedback
+restagefeedback::
+ rm -rf all-stagefeedback-gcc
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stagefeedback-gcc
+
+
+
+
+
+stagefeedback-start::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ cd stageprofile-gcc && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
+
+profiledbootstrap: all-bootstrap configure-gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ echo "Bootstrapping the compiler"; \
+ $(MAKE) stageprofile-bubble distclean-stagefeedback stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries and training compiler"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ echo "Building feedback based compiler"; \
+ $(MAKE) stagefeedback-bubble stagefeedback-end
+
+@endif gcc-bootstrap
+