From 2835df2db65b1c03f3f21f553b8f31db0fb1b6c0 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 26 Sep 2013 23:56:53 +0200 Subject: [PATCH] Fix for make -j race from #9531 injected by cleanup in b1a22518f0c687db. --- Makefile.in | 4 ++++ mk/stage0.mk | 2 -- mk/target.mk | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6363326571e..f8379485e2c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -608,6 +608,10 @@ config.stamp: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt # Primary-target makefiles ###################################################################### +# Issue #9531: If you change the order of any of the following (or add +# new definitions), make sure definitions always precede their uses, +# especially for the dependency lists of recipes. + include $(CFG_SRC_DIR)mk/target.mk include $(CFG_SRC_DIR)mk/host.mk include $(CFG_SRC_DIR)mk/stage0.mk diff --git a/mk/stage0.mk b/mk/stage0.mk index b11dca3aa06..c1b0242bbc6 100644 --- a/mk/stage0.mk +++ b/mk/stage0.mk @@ -6,8 +6,6 @@ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/: $(HLIB0_H_$(CFG_BUILD_TRIPLE))/: mkdir -p $@ -SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)) - $(SNAPSHOT_RUSTC_POST_CLEANUP): \ $(S)src/snapshots.txt \ $(S)src/etc/get-snapshot.py $(MKFILE_DEPS) \ diff --git a/mk/target.mk b/mk/target.mk index e540d856ecd..8592f7968c8 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -36,6 +36,8 @@ WFLAGS_ST2 = -D warnings # had its chance to clean it out; otherwise the other products will be # inadvertantly included in the clean out. +SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)) + define TARGET_STAGE_N $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \