From 6fc33163dcbd3dba8405ab5a9977e22479e81d76 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 21 Jul 2011 23:54:48 -0700 Subject: [PATCH] Change the CFG_STDLIB_DEFAULT macro into a call that picks the correct stage stageN/rustc depends on either stageN/libstd.so or stage(N-1)/lib/libstd.rlib so CFG_STDLIB_DEFAULT needs to try harder to get the dependencies right. --- Makefile.in | 8 ++++---- mk/stageN.mk | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index cc265795ce8..df0ac6c9960 100644 --- a/Makefile.in +++ b/Makefile.in @@ -50,9 +50,9 @@ CFG_STDLIB :=$(call CFG_LIB_NAME,std) CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc) ifdef CFG_DISABLE_SHAREDSTD - CFG_STDLIB_DEFAULT := lib/libstd.rlib + CFG_STDLIB_DEFAULT = $(1)/lib/libstd.rlib else - CFG_STDLIB_DEFAULT := $(CFG_STDLIB) + CFG_STDLIB_DEFAULT = $(2)/$(CFG_STDLIB) endif # version-string calculation @@ -165,7 +165,7 @@ define SREQ ifdef CFG_DISABLE_SHAREDSTD SREQ$(1) = stage$(1)/rustc$(X) \ stage$(1)/$$(CFG_RUNTIME) \ - stage$(1)/$$(CFG_STDLIB_DEFAULT) \ + $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \ stage$(1)/$$(CFG_RUSTLLVM) \ stage$(1)/lib/glue.o \ stage$(1)/lib/main.o \ @@ -174,7 +174,7 @@ SREQ$(1) = stage$(1)/rustc$(X) \ else SREQ$(1) = stage$(1)/rustc$(X) \ stage$(1)/$$(CFG_RUNTIME) \ - stage$(1)/$$(CFG_STDLIB_DEFAULT) \ + $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \ stage$(1)/$$(CFG_RUSTLLVM) \ stage$(1)/lib/glue.o \ stage$(1)/lib/main.o \ diff --git a/mk/stageN.mk b/mk/stageN.mk index 1338f1ae30f..171b954d9a7 100644 --- a/mk/stageN.mk +++ b/mk/stageN.mk @@ -50,10 +50,10 @@ stage$(2)/%.o: stage$(2)/%.s @$$(call E, assemble [gcc]: $$@) $$(Q)gcc $$(CFG_GCCISH_CFLAGS) -o $$@ -c $$< -stage$(2)/rustc$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \ - stage$(2)/$$(CFG_RUNTIME) \ - stage$(1)/$$(CFG_STDLIB_DEFAULT) \ - stage$(2)/$$(CFG_RUSTLLVM) \ +stage$(2)/rustc$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \ + stage$(2)/$$(CFG_RUNTIME) \ + $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(2)) \ + stage$(2)/$$(CFG_RUSTLLVM) \ $$(SREQ$(1)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)) -L stage$(2) -o $$@ $$<