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.
This commit is contained in:
Brian Anderson 2011-07-21 23:54:48 -07:00
parent e891e0b992
commit 6fc33163dc
2 changed files with 8 additions and 8 deletions

View File

@ -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 \

View File

@ -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 $$@ $$<