aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-04-20 15:21:16 +0000
committerGraydon Hoare <[email protected]>2011-04-20 15:24:04 +0000
commitc470cd2d662dfff155503813d1139799c60bdd04 (patch)
treeb400a67ec45a0a23676ae1f27e561386a25cdb18
parentChange trans.collect_items to use walk, not fold (diff)
downloadrust-c470cd2d662dfff155503813d1139799c60bdd04.tar.xz
rust-c470cd2d662dfff155503813d1139799c60bdd04.zip
Fix stage1 Makefile rules.
-rw-r--r--Makefile.in34
1 files changed, 25 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index e245990a..d6ac15e2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -497,15 +497,13 @@ stage0/rustc$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(BREQ)
$(BOOT) -minimal -o $@ $<
$(Q)chmod 0755 $@
-stage1/rustc$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ0)
+stage1/rustc.s: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ0)
@$(call E, compile: $@)
- $(STAGE0) -o $@ $<
- $(Q)chmod 0755 $@
+ $(STAGE0) -S -o $@ $<
-stage2/rustc$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
+stage2/rustc.s: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
@$(call E, compile: $@)
- $(STAGE1) -o $@ $<
- $(Q)chmod 0755 $@
+ $(STAGE1) -S -o $@ $<
@@ -531,17 +529,35 @@ stage2/glue.s: stage2/rustc$(X) stage1/$(CFG_STDLIB) \
# compiler that relies on a .o file.
stage0/%.o: stage0/%.s
- @$(call E, assemble [llvm]: $@)
+ @$(call E, assemble [gcc]: $@)
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
stage1/%.o: stage1/%.s
- @$(call E, assemble [llvm]: $@)
+ @$(call E, assemble [gcc]: $@)
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
stage2/%.o: stage2/%.s
- @$(call E, assemble [llvm]: $@)
+ @$(call E, assemble [gcc]: $@)
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
+stage1/%$(X): stage1/%.o $(SREQ0)
+ @$(call E, link [gcc]: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) stage0/glue.o -o $@ $< \
+ -Lstage0 -Lrt -lrustrt -lstd -lm
+ @# dsymutil sometimes fails or prints a warning, but the
+ @# program still runs. Since it simplifies debugging other
+ @# programs, I\'ll live with the noise.
+ -$(Q)$(CFG_DSYMUTIL) $@
+
+stage2/%$(X): stage2/%.o $(SREQ1)
+ @$(call E, link [gcc]: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) stage1/glue.o -o $@ $< \
+ -Lstage1 -Lrt -lrustrt -lstd -lm
+ @# dsymutil sometimes fails or prints a warning, but the
+ @# program still runs. Since it simplifies debugging other
+ @# programs, I\'ll live with the noise.
+ -$(Q)$(CFG_DSYMUTIL) $@
+
######################################################################