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:
@@ -1,56 +0,0 @@
|
||||
From 8efc27cfdbebcfb0e544ce1b7ee242955af0f68a Mon Sep 17 00:00:00 2001
|
||||
From: Cody P Schafer <dev@codyps.com>
|
||||
Date: Thu, 4 Feb 2016 10:44:23 -0500
|
||||
Subject: [PATCH 10/11] mk: allow changing the platform configuration source
|
||||
directory
|
||||
|
||||
---
|
||||
configure | 4 +++-
|
||||
mk/platform.mk | 2 +-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 7747850..f5224ca 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -663,6 +663,7 @@ valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
|
||||
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
|
||||
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
|
||||
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
|
||||
+valopt_nosave platform-cfg "${CFG_SRC_DIR}/mk/cfg" "Location platform configuration for non-rust code"
|
||||
|
||||
CFG_LIBDIR_RELATIVE=lib
|
||||
|
||||
@@ -1084,7 +1085,7 @@ CFG_MANDIR=${CFG_MANDIR%/}
|
||||
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
|
||||
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
|
||||
CFG_SUPPORTED_TARGET=""
|
||||
-for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
|
||||
+for target_file in ${CFG_PLATFORM_CFG}/*.mk; do
|
||||
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
|
||||
done
|
||||
|
||||
@@ -1780,6 +1781,7 @@ putvar CFG_I686_LINUX_ANDROID_NDK
|
||||
putvar CFG_NACL_CROSS_PATH
|
||||
putvar CFG_MANDIR
|
||||
putvar CFG_USING_LIBCPP
|
||||
+putvar CFG_PLATFORM_CFG
|
||||
|
||||
# Avoid spurious warnings from clang by feeding it original source on
|
||||
# ccache-miss rather than preprocessed input.
|
||||
diff --git a/mk/platform.mk b/mk/platform.mk
|
||||
index b959d59..bddd203 100644
|
||||
--- a/mk/platform.mk
|
||||
+++ b/mk/platform.mk
|
||||
@@ -97,7 +97,7 @@ $(foreach cvar,CC CXX CPP CFLAGS CXXFLAGS CPPFLAGS, \
|
||||
|
||||
CFG_RLIB_GLOB=lib$(1)-*.rlib
|
||||
|
||||
-include $(wildcard $(CFG_SRC_DIR)mk/cfg/*.mk)
|
||||
+include $(wildcard $(CFG_PLATFORM_CFG)/*.mk)
|
||||
|
||||
define ADD_INSTALLED_OBJECTS
|
||||
INSTALLED_OBJECTS_$(1) += $$(CFG_INSTALLED_OBJECTS_$(1))
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -11,7 +11,6 @@ SRC_URI += " \
|
||||
file://rust-${PV}/0007-mk-install-use-disable-rewrite-paths.patch \
|
||||
file://rust-${PV}/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch \
|
||||
file://rust-${PV}/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch \
|
||||
file://rust-${PV}/0010-mk-allow-changing-the-platform-configuration-source-.patch \
|
||||
file://rust-${PV}/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch \
|
||||
file://rust-installer-${PV}/0001-add-option-to-disable-rewriting-of-install-paths.patch;patchdir=src/rust-installer \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user