Skip to content

Commit e4c0fad

Browse files
committed
Fix 'make all' to build all the way through stage2. Closes #3978
1 parent 2fd2a56 commit e4c0fad

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Makefile.in

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
351351
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
352352
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
353353

354-
# Prerequisites for a working stageN compiler and libraries
354+
# Prerequisites for a working stageN compiler and libraries, for a specific target
355355
SREQ$(1)_T_$(2)_H_$(3) = \
356356
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
357357
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
358358
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)
359359

360-
# Prerequisites for a working stageN compiler and libraries
360+
# Prerequisites for a working stageN compiler and libraries, for a specific target
361361
CSREQ$(1)_T_$(2)_H_$(3) = \
362362
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
363363
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
@@ -472,11 +472,22 @@ CFG_INFO := $(info cfg: *** compiler is in snapshot transition ***)
472472
CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
473473
CFG_INFO := $(info cfg:)
474474

475+
#XXX This is surely busted
475476
all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs
476477

477478
else
478479

479-
all: $(CSREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) docs
480+
define ALL_TARGET_N
481+
all-target-$(1)-host-$(2): $$(CSREQ2_T_$(1)_H_$(2))
482+
endef
483+
484+
$(foreach target,$(CFG_TARGET_TRIPLES), \
485+
$(eval $(call ALL_TARGET_N,$(target),$(CFG_HOST_TRIPLE))))
486+
487+
ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
488+
all-target-$(target)-host-$(CFG_HOST_TRIPLE))
489+
490+
all: $(ALL_TARGET_RULES) $(GENERATED) docs
480491

481492
endif
482493

0 commit comments

Comments
 (0)