rt: Build __morestack as a static library and copy it to the right places
This commit is contained in:
parent
3a80d7b0e3
commit
cd91c6d065
|
@ -281,7 +281,8 @@ HOST_SREQ$(1) = \
|
||||||
TARGET_SREQ$(1)$(2) = \
|
TARGET_SREQ$(1)$(2) = \
|
||||||
$$(HOST_SREQ$(1)) \
|
$$(HOST_SREQ$(1)) \
|
||||||
$$(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME) \
|
$$(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
|
# Prerequisites for complete stageN targets
|
||||||
SREQ$(1)$(2) = \
|
SREQ$(1)$(2) = \
|
||||||
|
|
|
@ -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_RUNTIME))
|
||||||
$(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),$$(CFG_STDLIB))
|
$(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)),intrinsics.bc)
|
||||||
|
$(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),libmorestack.a)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||||
|
|
4
mk/rt.mk
4
mk/rt.mk
|
@ -139,6 +139,10 @@ rt/$(1)/%.o: rt/%.S $$(MKFILES)
|
||||||
@$$(call E, compile: $$@)
|
@$$(call E, compile: $$@)
|
||||||
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1))) $$<
|
$$(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) \
|
rt/$(1)/$(CFG_RUNTIME): $$(RUNTIME_OBJS_$(1)) $$(MKFILES) \
|
||||||
$$(RUNTIME_HDR_$(1)) \
|
$$(RUNTIME_HDR_$(1)) \
|
||||||
$$(RUNTIME_DEF_$(1)) \
|
$$(RUNTIME_DEF_$(1)) \
|
||||||
|
|
|
@ -17,6 +17,10 @@ $$(TARGET_LIB$(1)$(2))/intrinsics.bc: $$(TARGET_LIB$(1)$(2))/intrinsics.ll \
|
||||||
@$$(call E, llvms-as: $$@)
|
@$$(call E, llvms-as: $$@)
|
||||||
$$(Q)$$(LLVM_AS_$(2)) -o $$@ $$<
|
$$(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): \
|
$$(TARGET_LIB$(1)$(2))/$$(CFG_STDLIB): \
|
||||||
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
|
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
|
||||||
$$(TARGET_SREQ$(1)$(2))
|
$$(TARGET_SREQ$(1)$(2))
|
||||||
|
|
Loading…
Reference in New Issue