Skip to content

Commit 2c16be4

Browse files
committed
Use main.o directly now that stage0 is ok with it.
1 parent 124ad32 commit 2c16be4

File tree

7 files changed

+9
-14
lines changed

7 files changed

+9
-14
lines changed

Makefile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/comp/, \
144144
######################################################################
145145

146146
LREQ := rt/$(CFG_RUNTIME) rustllvm/$(CFG_RUSTLLVM)
147-
SREQ0 := stage0/rustc$(X) $(LREQ) rt/main.a stage1/glue.o stage1/$(CFG_STDLIB)
148-
SREQ1 := stage1/rustc$(X) $(LREQ) rt/main.a stage2/glue.o stage2/$(CFG_STDLIB)
149-
SREQ2 := stage2/rustc$(X) $(LREQ) rt/main.a stage3/glue.o stage3/$(CFG_STDLIB)
147+
SREQ0 := stage0/rustc$(X) $(LREQ) rt/main.o stage1/glue.o stage1/$(CFG_STDLIB)
148+
SREQ1 := stage1/rustc$(X) $(LREQ) rt/main.o stage2/glue.o stage2/$(CFG_STDLIB)
149+
SREQ2 := stage2/rustc$(X) $(LREQ) rt/main.o stage3/glue.o stage3/$(CFG_STDLIB)
150150

151151

152152
######################################################################

mk/clean.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ clean:
2929
$(Q)rm -f rustllvm/$(CFG_RUSTLLVM) rustllvm/rustllvmbits.a
3030
$(Q)rm -f rt/$(CFG_RUNTIME)
3131
$(Q)rm -f rt/main.o
32-
$(Q)rm -f rt/main.a
3332
$(Q)rm -Rf $(PKG_NAME)-*.tar.gz dist
3433
$(Q)rm -f $(foreach ext,o a d bc s exe,$(wildcard stage*/*.$(ext)))
3534
$(Q)rm -Rf $(foreach ext,out out.tmp \

mk/rt.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ rt/main.ll: rt/main.ll.in
8484
sed 's/MAIN/main/' < $^ > $@
8585
endif
8686

87-
rt/main.a: rt/main.o
88-
rm -f $@
89-
ar crs $@ $^
90-
9187
rt/%.o: rt/%.ll $(MKFILES)
9288
@$(call E, llc: $@)
9389
$(Q)$(LLC) -filetype=obj -relocation-model=pic -march=x86 -o $@ $<

mk/stage1.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ stage1/%.o: stage1/%.s
4444
stage1/%$(X): stage1/%.o $(SREQ0)
4545
@$(call E, link [gcc]: $@)
4646
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage1/glue.o -o $@ $< \
47-
-Lstage1 -Lrustllvm -Lrt rt/main.a -lrustrt -lrustllvm -lstd -lm
47+
-Lstage1 -Lrustllvm -Lrt rt/main.o -lrustrt -lrustllvm -lstd -lm
4848
@# dsymutil sometimes fails or prints a warning, but the
4949
@# program still runs. Since it simplifies debugging other
5050
@# programs, I\'ll live with the noise.

mk/stage2.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ stage2/%.o: stage2/%.s
4444
stage2/%$(X): stage2/%.o $(SREQ1)
4545
@$(call E, link [gcc]: $@)
4646
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage2/glue.o -o $@ $< \
47-
-Lstage2 -Lrustllvm -Lrt rt/main.a -lrustrt -lrustllvm -lstd -lm
47+
-Lstage2 -Lrustllvm -Lrt rt/main.o -lrustrt -lrustllvm -lstd -lm
4848
@# dsymutil sometimes fails or prints a warning, but the
4949
@# program still runs. Since it simplifies debugging other
5050
@# programs, I\'ll live with the noise.

mk/stage3.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ stage3/%.o: stage3/%.s
4444
stage3/%$(X): stage3/%.o $(SREQ2)
4545
@$(call E, link [gcc]: $@)
4646
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o -o $@ $< \
47-
-Lstage3 -Lrustllvm -Lrt rt/main.a -lrustrt -lrustllvm -lstd -lm
47+
-Lstage3 -Lrustllvm -Lrt rt/main.o -lrustrt -lrustllvm -lstd -lm
4848
@# dsymutil sometimes fails or prints a warning, but the
4949
@# program still runs. Since it simplifies debugging other
5050
@# programs, I\'ll live with the noise.

mk/tests.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ compile-check: tidy \
185185
%.stage0$(X): %.stage0.o $(SREQ0)
186186
@$(call E, link [gcc]: $@)
187187
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage1/glue.o -o $@ $< \
188-
-Lstage1 -Lrt rt/main.a -lrustrt -lstd -lm
188+
-Lstage1 -Lrt rt/main.o -lrustrt -lstd -lm
189189
@# dsymutil sometimes fails or prints a warning, but the
190190
@# program still runs. Since it simplifies debugging other
191191
@# programs, I\'ll live with the noise.
@@ -194,7 +194,7 @@ compile-check: tidy \
194194
%.stage1$(X): %.stage1.o $(SREQ1)
195195
@$(call E, link [gcc]: $@)
196196
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage2/glue.o -o $@ $< \
197-
-Lstage2 -Lrt rt/main.a -lrustrt -lstd -lm
197+
-Lstage2 -Lrt rt/main.o -lrustrt -lstd -lm
198198
@# dsymutil sometimes fails or prints a warning, but the
199199
@# program still runs. Since it simplifies debugging other
200200
@# programs, I\'ll live with the noise.
@@ -203,7 +203,7 @@ compile-check: tidy \
203203
%.stage2$(X): %.stage2.o $(SREQ2)
204204
@$(call E, link [gcc]: $@)
205205
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o -o $@ $< \
206-
-Lstage3 -Lrt rt/main.a -lrustrt -lstd -lm
206+
-Lstage3 -Lrt rt/main.o -lrustrt -lstd -lm
207207
@# dsymutil sometimes fails or prints a warning, but the
208208
@# program still runs. Since it simplifies debugging other
209209
@# programs, I\'ll live with the noise.

0 commit comments

Comments
 (0)