$(LTO_FLAGS_TO_PASS) \
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+@if gcc-bootstrap
+EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ fi ;
+
+EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS"
+@endif gcc-bootstrap
+
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; those variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif bfd
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif opcodes
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif binutils
@if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/bison && \
- $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(MAKE) $(FLAGS_TO_PASS) check)
fi
@endif bison
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(FLAGS_TO_PASS) check)
@if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/fastjar && \
- $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(MAKE) $(FLAGS_TO_PASS) check)
fi
@endif fastjar
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/fixincludes && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif fixincludes
@if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/flex && \
- $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(MAKE) $(FLAGS_TO_PASS) check)
fi
@endif flex
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gas
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gcc
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gmp
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif mpfr
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif mpc
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/isl && \
- $(MAKE) $(FLAGS_TO_PASS) V=1 check)
+ $(MAKE) $(FLAGS_TO_PASS) V=1 $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif isl
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libelf
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gold
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif intl
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif ld
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libbacktrace && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libbacktrace
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libcpp
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libdecnumber
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libiberty
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
- $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ check)
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libiberty-linker-plugin
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ check)
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif lto-plugin
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libcc1 && \
$(MAKE) $(FLAGS_TO_PASS) check)
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gotools && \
$(MAKE) $(FLAGS_TO_PASS) check)