fixup relative rpaths, remove unused func, fixup llc usage
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From 0f6c3e00618fae91987e7d5bf52dbd63ec291f99 Mon Sep 17 00:00:00 2001
|
||||
From: Cody P Schafer <dev@codyps.com>
|
||||
Date: Thu, 20 Nov 2014 15:56:58 -0500
|
||||
Subject: [PATCH] mk/rt: use CFG_LLVM_TARGET instead of plain target when
|
||||
calling llc
|
||||
|
||||
---
|
||||
mk/rt.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mk/rt.mk b/mk/rt.mk
|
||||
index a7d6a6e..38aec83 100644
|
||||
--- a/mk/rt.mk
|
||||
+++ b/mk/rt.mk
|
||||
@@ -75,7 +75,7 @@ $$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \
|
||||
@mkdir -p $$(@D)
|
||||
@$$(call E, compile: $$@)
|
||||
$$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \
|
||||
- -filetype=obj -mtriple=$(1) -relocation-model=pic -o $$@ $$<
|
||||
+ -filetype=obj -mtriple=$$(CFG_LLVM_TARGET_$(1)) -relocation-model=pic -o $$@ $$<
|
||||
|
||||
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
|
||||
@mkdir -p $$(@D)
|
||||
--
|
||||
2.1.3
|
||||
|
||||
@@ -67,7 +67,7 @@ HOST_CPPFLAGS ??= "${CPPFLAGS}"
|
||||
# relative ones so things work a bit better
|
||||
#
|
||||
# XXX: may need to restrict the -rpath flags to only BUILD & HOST
|
||||
RELATIVE_LIB_FROM_BIN = "${@os.path.relpath('libdir', 'bindir')}"
|
||||
RELATIVE_LIB_FROM_BIN = "${@os.path.relpath('${libdir}', '${bindir}')}"
|
||||
RPATH_LDFLAGS = "-Wl,--enable-new-dtags -Wl,-rpath=$ORIGIN/${RELATIVE_LIB_FROM_BIN} -Wl,-rpath-link=$ORIGIN/${RELATIVE_LIB_FROM_BIN}"
|
||||
TARGET_PRE_LINK_ARGS = "${RPATH_LDFLAGS} ${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
|
||||
BUILD_PRE_LINK_ARGS = "${RPATH_LDFLAGS} ${BUILD_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
|
||||
@@ -240,6 +240,8 @@ def rust_gen_mk_cfg(d, thing):
|
||||
'-e', '/^CFG_GCCISH_CFLAGS/ s;$; {};'.format(cflags_for(d, thing)),
|
||||
'-e', '/^CFG_GCCISH_CXXFLAGS/ s;$; {};'.format(cxxflags_for(d, thing)),
|
||||
'-e', '/^CFG_GCCISH_LINK_FLAGS/ s;$; {};'.format(ldflags),
|
||||
|
||||
# May need to add: CFG_LLC_FLAGS_{}
|
||||
], stdout=o, stdin=i)
|
||||
if r:
|
||||
raise Exception
|
||||
@@ -252,10 +254,6 @@ python do_rust_arch_fixup () {
|
||||
addtask rust_arch_fixup before do_configure after do_patch
|
||||
do_rust_arch_fixup[dirs] = "${S}/mk/cfg"
|
||||
|
||||
def rel_bin_to_lib(bindir, libdir):
|
||||
os.path.relpath(libdir, bindir)
|
||||
|
||||
|
||||
do_configure () {
|
||||
# FIXME: target_prefix vs prefix, see cross.bbclass
|
||||
|
||||
|
||||
@@ -18,4 +18,5 @@ SRC_URI_append = "\
|
||||
file://0059-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch \
|
||||
file://0060-src-etc-install.sh-use-LIBDIR-and-BINDIR-RELATIVE.patch \
|
||||
file://0061-configure-silence-warning-about-LOCAL_RUST_ROOT-bein.patch \
|
||||
file://0070-mk-rt-use-CFG_LLVM_TARGET-instead-of-plain-target-wh.patch \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user