Apply the makefile changes again, this time fixin the driver to not produce a

rustc.exe.exe.
This commit is contained in:
Rafael Ávila de Espíndola 2011-06-14 17:51:31 -04:00
parent 1cc7165e62
commit c3015b8952
2 changed files with 9 additions and 22 deletions

View File

@ -200,15 +200,13 @@ compile-check: tidy \
@# programs, I\'ll live with the noise.
-$(Q)$(CFG_DSYMUTIL) $@
%.stage2$(X): %.stage2.o $(SREQ2)
@$(call E, link [gcc]: $@)
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o -o $@ $< \
-Lstage3 -Lrt rt/main.o -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): %.rs $(SREQ2)
@$(call E, compile_and_link: $@)
$(STAGE2) -o $@ $<
%.stage2$(X): %.rc $(SREQ2)
@$(call E, compile_and_link: $@)
$(STAGE2) -o $@ $<
%.stage0.o: %.rc $(SREQ0)
@$(call E, compile [stage0]: $@)
@ -227,15 +225,6 @@ compile-check: tidy \
@$(call E, compile [stage1]: $@)
$(STAGE1) -c -o $@ $<
%.stage2.o: %.rc $(SREQ2)
@$(call E, compile [stage2]: $@)
$(STAGE2) -c -o $@ $<
%.stage2.o: %.rs $(SREQ2)
@$(call E, compile [stage2]: $@)
$(STAGE2) -c -o $@ $<
# Cancel the implicit .out rule in GNU make.
%.out: %

View File

@ -449,7 +449,6 @@ fn main(vec[str] args) {
let str stage = "-L" + binary_dir;
let vec[str] gcc_args;
let str prog = "gcc";
let str exe_suffix = "";
// The invocations of gcc share some flags across platforms
let vec[str] common_cflags = ["-fno-strict-aliasing", "-fPIC",
@ -459,25 +458,24 @@ fn main(vec[str] args) {
alt (sess.get_targ_cfg().os) {
case (session::os_win32) {
exe_suffix = ".exe";
gcc_args = common_cflags + [
"-march=i686", "-O2",
glu, main, "-o",
saved_out_filename + exe_suffix,
saved_out_filename,
saved_out_filename + ".o"] + common_libs;
}
case (session::os_macos) {
gcc_args = common_cflags + [
"-arch i386", "-O0", "-m32",
glu, main, "-o",
saved_out_filename + exe_suffix,
saved_out_filename,
saved_out_filename + ".o"] + common_libs;
}
case (session::os_linux) {
gcc_args = common_cflags + [
"-march=i686", "-O2", "-m32",
glu, main, "-o",
saved_out_filename + exe_suffix,
saved_out_filename,
saved_out_filename + ".o"] + common_libs;
}
}