about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-09-26 14:57:35 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-09-26 14:57:43 -0700
commite7b8388cb44b24ed53870a4e42306bd1092d1962 (patch)
tree905fed417f711a491a7e397c0e382d2f6ad70ef8
parente956edeb55f3f2875fd2fe00cb21bd48f29c1842 (diff)
Pass stage1 for relevant portion of "stage0" cross compile
-rw-r--r--Makefile.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index fae389798ec..25d44952444 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -357,6 +357,15 @@ EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
 
 CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
 
+# Pass --cfg stage0 only for the build->host part of stage0;
+# if you're building a cross config, the host->* parts are
+# effectively stage1, since it uses the just-built stage0.
+ifeq ($(1),0)
+ifneq ($(strip $(CFG_HOST_TRIPLE)),$(strip $(3)))
+CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
+endif
+endif
+
 STAGE$(1)_T_$(2)_H_$(3) := 						\
 	$$(Q)$$(call CFG_RUN_TARG,$(1),				\
 		$$(CFG_VALGRIND_COMPILE$(1)) 			\