@@ -200,13 +200,15 @@ compile-check: tidy \
200
200
@# programs, I\'ll live with the noise.
201
201
-$(Q)$(CFG_DSYMUTIL) $@
202
202
203
- % .stage2$(X ) : % .rs $(SREQ2 )
204
- @$(call E, compile_and_link: $@ )
205
- $(STAGE2 ) -o $@ $<
203
+ % .stage2$(X ) : % .stage2.o $(SREQ2 )
204
+ @$(call E, link [gcc]: $@ )
205
+ $(Q ) gcc $(CFG_GCCISH_CFLAGS ) stage3/glue.o -o $@ $< \
206
+ -Lstage3 -Lrt rt/main.o -lrustrt -lstd -lm
207
+ @# dsymutil sometimes fails or prints a warning, but the
208
+ @# program still runs. Since it simplifies debugging other
209
+ @# programs, I\'ll live with the noise.
210
+ -$(Q)$(CFG_DSYMUTIL) $@
206
211
207
- % .stage2$(X ) : % .rc $(SREQ2 )
208
- @$(call E, compile_and_link: $@ )
209
- $(STAGE2 ) -o $@ $<
210
212
211
213
% .stage0.o : % .rc $(SREQ0 )
212
214
@$(call E, compile [stage0]: $@ )
@@ -225,6 +227,15 @@ compile-check: tidy \
225
227
@$(call E, compile [stage1]: $@ )
226
228
$(STAGE1 ) -c -o $@ $<
227
229
230
+
231
+ % .stage2.o : % .rc $(SREQ2 )
232
+ @$(call E, compile [stage2]: $@ )
233
+ $(STAGE2 ) -c -o $@ $<
234
+
235
+ % .stage2.o : % .rs $(SREQ2 )
236
+ @$(call E, compile [stage2]: $@ )
237
+ $(STAGE2 ) -c -o $@ $<
238
+
228
239
# Cancel the implicit .out rule in GNU make.
229
240
% .out : %
230
241
0 commit comments