# Flags to pass to stage2 and later makes. They are defined
# here so that they can be overridden by Makefile fragments.
BOOT_CFLAGS= -g -O2
+BOOT_ADAFLAGS=
+BOOT_LDFLAGS=
BISON = @BISON@
YACC = @YACC@
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"SHELL=$(SHELL)" \
"YACC=$(YACC)" \
+ "ADAFLAGS=$(ADAFLAGS)" \
"AR_FLAGS=$(AR_FLAGS)" \
+ "BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)" \
+ "BOOT_CFLAGS=$(BOOT_CFLAGS)" \
+ "BOOT_LDFLAGS=$(BOOT_LDFLAGS)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCXXFLAGS=$(LIBCXXFLAGS)" \
+ "ADAFLAGS_FOR_TARGET=$(ADAFLAGS_FOR_TARGET)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
# COMPILER_ prefixed variables are not passed down so we expand them here.
EXTRA_TARGET_FLAGS = \
+ 'ADAFLAGS=$$(ADAFLAGS_FOR_TARGET)' \
'AR=$$(AR_FOR_TARGET)' \
'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET)' \
else \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \
fi
- @: $(MAKE); $(stage)
.PHONY: all-build
all-build: \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) info-host \
info-target
- @: $(MAKE); $(stage)
.PHONY: info-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) dvi-host \
dvi-target
- @: $(MAKE); $(stage)
.PHONY: dvi-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) html-host \
html-target
- @: $(MAKE); $(stage)
.PHONY: html-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) TAGS-host \
TAGS-target
- @: $(MAKE); $(stage)
.PHONY: TAGS-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) install-info-host \
install-info-target
- @: $(MAKE); $(stage)
.PHONY: install-info-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) installcheck-host \
installcheck-target
- @: $(MAKE); $(stage)
.PHONY: installcheck-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) mostlyclean-host \
mostlyclean-target
- @: $(MAKE); $(stage)
.PHONY: mostlyclean-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) clean-host \
clean-target
- @: $(MAKE); $(stage)
.PHONY: clean-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) distclean-host \
distclean-target
- @: $(MAKE); $(stage)
.PHONY: distclean-host
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) maintainer-clean-host \
maintainer-clean-target
- @: $(MAKE); $(stage)
.PHONY: maintainer-clean-host
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target
- @: $(MAKE); $(stage)
# Automated reporting of test results.
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target
- @: $(MAKE); $(stage)
.PHONY: install-host-nogcc
install-host-nogcc: \
@if gcc-bootstrap
unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
-stage = [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi
@endif gcc-bootstrap
.PHONY: unstage stage
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
STAGE_PREFIX=$$r/prev-gcc/ \
CFLAGS="$(BOOT_CFLAGS)" \
+ ADAFLAGS="$(BOOT_ADAFLAGS)" \
+ LDFLAGS="$(BOOT_LDFLAGS)" \
ADAC="\$$(CC)"
# For stage 1:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
- @: $(MAKE); $(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
$(MAKE) stage3-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3; \
fi
- $(MAKE) compare
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare
.PHONY: all-stage3 clean-stage3
do-clean: clean-stage3
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
- @: $(MAKE); $(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
$(MAKE) stage4-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4; \
fi
- $(MAKE) compare3
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare3
.PHONY: all-stage4 clean-stage4
do-clean: clean-stage4
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
- @: $(MAKE); $(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
- @: $(MAKE); $(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap