rt: Build __morestack as a static library and copy it to the right places

This commit is contained in:
Brian Anderson 2011-11-28 17:23:13 -08:00
parent 3a80d7b0e3
commit cd91c6d065
4 changed files with 11 additions and 1 deletions

View File

@ -281,7 +281,8 @@ HOST_SREQ$(1) = \
TARGET_SREQ$(1)$(2) = \
$$(HOST_SREQ$(1)) \
$$(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME) \
$$(TARGET_LIB$(1)$(2))/intrinsics.bc
$$(TARGET_LIB$(1)$(2))/intrinsics.bc \
$$(TARGET_LIB$(1)$(2))/libmorestack.a
# Prerequisites for complete stageN targets
SREQ$(1)$(2) = \

View File

@ -43,6 +43,7 @@ install-target$(1): $$(SREQ$$(ISTAGE)$(1))
$(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),$$(CFG_RUNTIME))
$(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),$$(CFG_STDLIB))
$(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),intrinsics.bc)
$(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),libmorestack.a)
endef
$(foreach target,$(CFG_TARGET_TRIPLES), \

View File

@ -139,6 +139,10 @@ rt/$(1)/%.o: rt/%.S $$(MKFILES)
@$$(call E, compile: $$@)
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1))) $$<
rt/$(1)/arch/$$(HOST_$(1))/libmorestack.a: rt/$(1)/arch/$$(HOST_$(1))/morestack.o
@$$(call E, link: $$@)
$$(Q)ar rcs $$@ $$<
rt/$(1)/$(CFG_RUNTIME): $$(RUNTIME_OBJS_$(1)) $$(MKFILES) \
$$(RUNTIME_HDR_$(1)) \
$$(RUNTIME_DEF_$(1)) \

View File

@ -17,6 +17,10 @@ $$(TARGET_LIB$(1)$(2))/intrinsics.bc: $$(TARGET_LIB$(1)$(2))/intrinsics.ll \
@$$(call E, llvms-as: $$@)
$$(Q)$$(LLVM_AS_$(2)) -o $$@ $$<
$$(TARGET_LIB$(1)$(2))/libmorestack.a: rt/$(2)/arch/$$(HOST_$(2))/libmorestack.a
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(TARGET_LIB$(1)$(2))/$$(CFG_STDLIB): \
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
$$(TARGET_SREQ$(1)$(2))