@@ -132,26 +132,6 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
132
132
133
133
endef
134
134
135
- # Macro for building runtime startup objects
136
- # Of those we have two kinds:
137
- # - Rust runtime-specific: these are Rust's equivalents of GCC's crti.o/crtn.o,
138
- # - LibC-specific: these we don't build ourselves, but copy them from the system lib directory.
139
- #
140
- # $(1) - stage
141
- # $(2) - target triple
142
- # $(3) - host triple
143
- define TARGET_RT_STARTUP
144
-
145
- # Expand build rules for rsbegin.o and rsend.o
146
- $$(foreach obj,rsbegin rsend, \
147
- $$(eval $$(call TARGET_RUSTRT_STARTUP_OBJ,$(1 ) ,$(2 ) ,$(3 ) ,$$(obj ) ) ) )
148
-
149
- # Expand build rules for libc startup objects
150
- $$(foreach obj,$$(CFG_LIBC_STARTUP_OBJECTS_$(2 ) ) , \
151
- $$(eval $$(call TARGET_LIBC_STARTUP_OBJ,$(1 ) ,$(2 ) ,$(3 ) ,$$(obj ) ) ) )
152
-
153
- endef
154
-
155
135
# Macro for building runtime startup/shutdown object files;
156
136
# these are Rust's equivalent of crti.o, crtn.o
157
137
#
@@ -178,27 +158,6 @@ $$(foreach crate, $$(TARGET_CRATES), \
178
158
179
159
endef
180
160
181
- # Macro for copying libc startup objects into the target's lib directory.
182
- #
183
- # $(1) - stage
184
- # $(2) - target triple
185
- # $(3) - host triple
186
- # $(4) - object name
187
- define TARGET_LIBC_STARTUP_OBJ
188
-
189
- # Ask gcc where the startup object is located
190
- $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /$(4 ) : $$(shell $$(CC_$(2 ) ) -print-file-name=$(4 ) )
191
- @$$(call E, cp: $$@ )
192
- @cp $$^ $$@
193
-
194
- # Make sure this is done before libcore has finished building
195
- # (libcore itself does not depend on these objects, but other crates do,
196
- # so might as well do it here)
197
- $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /stamp.core : $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /$(4 )
198
-
199
- endef
200
-
201
-
202
161
# Every recipe in RUST_TARGET_STAGE_N outputs to $$(TLIB$(1)_T_$(2)_H_$(3),
203
162
# a directory that can be cleaned out during the middle of a run of
204
163
# the get-snapshot.py script. Therefore, every recipe needs to have
@@ -245,4 +204,5 @@ $(foreach host,$(CFG_HOST), \
245
204
$(foreach host,$(CFG_HOST), \
246
205
$(foreach target,$(CFG_TARGET), \
247
206
$(foreach stage,$(STAGES), \
248
- $(eval $(call TARGET_RT_STARTUP,$(stage),$(target),$(host))))))
207
+ $(foreach obj,rsbegin rsend, \
208
+ $(eval $(call TARGET_RUSTRT_STARTUP_OBJ,$(stage),$(target),$(host),$(obj)))))))
0 commit comments