rust: remove patch to change path to $S/mk/cfg

Since we no longer use shared source we can modify the source directory
as we build. This drops another patch we need to build and simplifies
the addition of Rust 1.12.1 in #97.
This commit is contained in:
Doug Goldstein
2016-12-02 08:55:34 -06:00
parent 98472fd232
commit 5985331f33
3 changed files with 5 additions and 62 deletions
+5 -5
View File
@@ -266,6 +266,7 @@ def rust_gen_mk_cfg(d, thing):
Note that the configure process also depends on the existence of #1, so we
have to run this before do_configure
'''
import os
import subprocess
rust_base_sys = rust_base_triple(d, thing)
@@ -275,9 +276,9 @@ def rust_gen_mk_cfg(d, thing):
llvm_target = d.getVarFlag('LLVM_TARGET', arch, True)
ldflags = d.getVar('LDFLAGS', True) + d.getVar('HOST_CC_ARCH', True) + d.getVar('TOOLCHAIN_OPTIONS', True)
b = d.getVar('WORKDIR', True) + '/mk-cfg/'
o = open(b + sys_for(d, thing) + '.mk', 'w')
i = open(d.getVar('S', True) + '/mk/cfg/' + rust_base_sys + '.mk', 'r')
b = os.path.join(d.getVar('S', True), 'mk', 'cfg')
o = open(os.path.join(b, sys_for(d, thing) + '.mk'), 'w')
i = open(os.path.join(b, rust_base_sys + '.mk'), 'r')
r = subprocess.call(['sed',
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
@@ -335,7 +336,7 @@ python do_rust_arch_fixup () {
rust_gen_mk_cfg(d, thing)
}
addtask rust_arch_fixup before do_configure after do_patch
do_rust_arch_fixup[dirs] += "${WORKDIR}/mk-cfg"
do_rust_arch_fixup[dirs] += "${S}/mk/cfg"
llvmdir = "${STAGING_DIR_NATIVE}/${prefix_native}"
@@ -374,7 +375,6 @@ do_configure () {
"--infodir=${infodir}" \
"--mandir=${mandir}" \
"--libdir=${libdir}" \
"--platform-cfg=${WORKDIR}/mk-cfg/" \
"--enable-local-rust" \
"--local-rust-root=${WORKDIR}/${RUST_SNAPSHOT}/rustc" \
${EXTRA_OECONF}