Skip to content

Commit e7b8388

Browse files
committed
Pass stage1 for relevant portion of "stage0" cross compile
1 parent e956ede commit e7b8388

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Makefile.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,15 @@ EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
357357

358358
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
359359

360+
# Pass --cfg stage0 only for the build->host part of stage0;
361+
# if you're building a cross config, the host->* parts are
362+
# effectively stage1, since it uses the just-built stage0.
363+
ifeq ($(1),0)
364+
ifneq ($(strip $(CFG_HOST_TRIPLE)),$(strip $(3)))
365+
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
366+
endif
367+
endif
368+
360369
STAGE$(1)_T_$(2)_H_$(3) := \
361370
$$(Q)$$(call CFG_RUN_TARG,$(1), \
362371
$$(CFG_VALGRIND_COMPILE$(1)) \

0 commit comments

Comments
 (0)