@@ -497,15 +497,13 @@ stage0/rustc$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(BREQ)
497
497
$(BOOT ) -minimal -o $@ $<
498
498
$(Q ) chmod 0755 $@
499
499
500
- stage1/rustc$( X ) : $(COMPILER_CRATE ) $(COMPILER_INPUTS ) $(SREQ0 )
500
+ stage1/rustc.s : $(COMPILER_CRATE ) $(COMPILER_INPUTS ) $(SREQ0 )
501
501
@$(call E, compile: $@ )
502
- $(STAGE0 ) -o $@ $<
503
- $(Q ) chmod 0755 $@
502
+ $(STAGE0 ) -S -o $@ $<
504
503
505
- stage2/rustc$( X ) : $(COMPILER_CRATE ) $(COMPILER_INPUTS ) $(SREQ1 )
504
+ stage2/rustc.s : $(COMPILER_CRATE ) $(COMPILER_INPUTS ) $(SREQ1 )
506
505
@$(call E, compile: $@ )
507
- $(STAGE1 ) -o $@ $<
508
- $(Q ) chmod 0755 $@
506
+ $(STAGE1 ) -S -o $@ $<
509
507
510
508
511
509
@@ -531,17 +529,35 @@ stage2/glue.s: stage2/rustc$(X) stage1/$(CFG_STDLIB) \
531
529
# compiler that relies on a .o file.
532
530
533
531
stage0/% .o : stage0/% .s
534
- @$(call E, assemble [llvm ]: $@ )
532
+ @$(call E, assemble [gcc ]: $@ )
535
533
$(Q ) gcc $(CFG_GCC_CFLAGS ) -o $@ -c $<
536
534
537
535
stage1/% .o : stage1/% .s
538
- @$(call E, assemble [llvm ]: $@ )
536
+ @$(call E, assemble [gcc ]: $@ )
539
537
$(Q ) gcc $(CFG_GCC_CFLAGS ) -o $@ -c $<
540
538
541
539
stage2/% .o : stage2/% .s
542
- @$(call E, assemble [llvm ]: $@ )
540
+ @$(call E, assemble [gcc ]: $@ )
543
541
$(Q ) gcc $(CFG_GCC_CFLAGS ) -o $@ -c $<
544
542
543
+ stage1/% $(X ) : stage1/% .o $(SREQ0 )
544
+ @$(call E, link [gcc]: $@ )
545
+ $(Q ) gcc $(CFG_GCC_CFLAGS ) stage0/glue.o -o $@ $< \
546
+ -Lstage0 -Lrt -lrustrt -lstd -lm
547
+ @# dsymutil sometimes fails or prints a warning, but the
548
+ @# program still runs. Since it simplifies debugging other
549
+ @# programs, I\'ll live with the noise.
550
+ -$(Q)$(CFG_DSYMUTIL) $@
551
+
552
+ stage2/% $(X ) : stage2/% .o $(SREQ1 )
553
+ @$(call E, link [gcc]: $@ )
554
+ $(Q ) gcc $(CFG_GCC_CFLAGS ) stage1/glue.o -o $@ $< \
555
+ -Lstage1 -Lrt -lrustrt -lstd -lm
556
+ @# dsymutil sometimes fails or prints a warning, but the
557
+ @# program still runs. Since it simplifies debugging other
558
+ @# programs, I\'ll live with the noise.
559
+ -$(Q)$(CFG_DSYMUTIL) $@
560
+
545
561
546
562
547
563
# #####################################################################
0 commit comments