Merge pull request #123 from cardoe/drop-mk-cfg-dir
Drop mk cfg directory change patch
This commit is contained in:
-56
@@ -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
|
Note that the configure process also depends on the existence of #1, so we
|
||||||
have to run this before do_configure
|
have to run this before do_configure
|
||||||
'''
|
'''
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
rust_base_sys = rust_base_triple(d, thing)
|
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)
|
llvm_target = d.getVarFlag('LLVM_TARGET', arch, True)
|
||||||
ldflags = d.getVar('LDFLAGS', True) + d.getVar('HOST_CC_ARCH', True) + d.getVar('TOOLCHAIN_OPTIONS', True)
|
ldflags = d.getVar('LDFLAGS', True) + d.getVar('HOST_CC_ARCH', True) + d.getVar('TOOLCHAIN_OPTIONS', True)
|
||||||
|
|
||||||
b = d.getVar('WORKDIR', True) + '/mk-cfg/'
|
b = os.path.join(d.getVar('S', True), 'mk', 'cfg')
|
||||||
o = open(b + sys_for(d, thing) + '.mk', 'w')
|
o = open(os.path.join(b, sys_for(d, thing) + '.mk'), 'w')
|
||||||
i = open(d.getVar('S', True) + '/mk/cfg/' + rust_base_sys + '.mk', 'r')
|
i = open(os.path.join(b, rust_base_sys + '.mk'), 'r')
|
||||||
|
|
||||||
r = subprocess.call(['sed',
|
r = subprocess.call(['sed',
|
||||||
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
||||||
@@ -335,9 +336,7 @@ python do_rust_arch_fixup () {
|
|||||||
rust_gen_mk_cfg(d, thing)
|
rust_gen_mk_cfg(d, thing)
|
||||||
}
|
}
|
||||||
addtask rust_arch_fixup before do_configure after do_patch
|
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}"
|
|
||||||
|
|
||||||
# prevent the rust-installer scripts from calling ldconfig
|
# prevent the rust-installer scripts from calling ldconfig
|
||||||
export CFG_DISABLE_LDCONFIG="notempty"
|
export CFG_DISABLE_LDCONFIG="notempty"
|
||||||
@@ -345,12 +344,6 @@ export CFG_DISABLE_LDCONFIG="notempty"
|
|||||||
do_configure () {
|
do_configure () {
|
||||||
# FIXME: target_prefix vs prefix, see cross.bbclass
|
# FIXME: target_prefix vs prefix, see cross.bbclass
|
||||||
|
|
||||||
# FIXME: this path to rustc (via `which rustc`) may not be quite right in the case
|
|
||||||
# where we're reinstalling the compiler. May want to try for a real
|
|
||||||
# path based on bitbake vars
|
|
||||||
# Also will be wrong when relative libdir and/or bindir aren't 'bin' and 'lib'.
|
|
||||||
local_rust_root="$PWD/dl"
|
|
||||||
|
|
||||||
# - rpath is required otherwise rustc fails to resolve symbols
|
# - rpath is required otherwise rustc fails to resolve symbols
|
||||||
# - submodule management is done by bitbake's fetching
|
# - submodule management is done by bitbake's fetching
|
||||||
${S}/configure \
|
${S}/configure \
|
||||||
@@ -361,7 +354,7 @@ do_configure () {
|
|||||||
"--enable-optimize" \
|
"--enable-optimize" \
|
||||||
"--enable-optimize-cxx" \
|
"--enable-optimize-cxx" \
|
||||||
"--disable-llvm-version-check" \
|
"--disable-llvm-version-check" \
|
||||||
"--llvm-root=${llvmdir}" \
|
"--llvm-root=${STAGING_DIR_NATIVE}/${prefix_native}" \
|
||||||
"--enable-optimize-tests" \
|
"--enable-optimize-tests" \
|
||||||
"--release-channel=stable" \
|
"--release-channel=stable" \
|
||||||
"--prefix=${prefix}" \
|
"--prefix=${prefix}" \
|
||||||
@@ -374,7 +367,6 @@ do_configure () {
|
|||||||
"--infodir=${infodir}" \
|
"--infodir=${infodir}" \
|
||||||
"--mandir=${mandir}" \
|
"--mandir=${mandir}" \
|
||||||
"--libdir=${libdir}" \
|
"--libdir=${libdir}" \
|
||||||
"--platform-cfg=${WORKDIR}/mk-cfg/" \
|
|
||||||
"--enable-local-rust" \
|
"--enable-local-rust" \
|
||||||
"--local-rust-root=${WORKDIR}/${RUST_SNAPSHOT}/rustc" \
|
"--local-rust-root=${WORKDIR}/${RUST_SNAPSHOT}/rustc" \
|
||||||
${EXTRA_OECONF}
|
${EXTRA_OECONF}
|
||||||
@@ -401,12 +393,6 @@ do_compile () {
|
|||||||
rust_do_install () {
|
rust_do_install () {
|
||||||
rust_runmake DESTDIR="${D}" install
|
rust_runmake DESTDIR="${D}" install
|
||||||
|
|
||||||
# Rust's install.sh doesn't mark executables as executable because
|
|
||||||
# we're using a custom bindir, do it ourselves.
|
|
||||||
chmod +x "${D}/${bindir}/rustc"
|
|
||||||
chmod +x "${D}/${bindir}/rustdoc"
|
|
||||||
chmod +x "${D}/${bindir}/rust-gdb"
|
|
||||||
|
|
||||||
# Install our custom target.json files
|
# Install our custom target.json files
|
||||||
local td="${D}${libdir}/rustlib/"
|
local td="${D}${libdir}/rustlib/"
|
||||||
install -d "$td"
|
install -d "$td"
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ SRC_URI += " \
|
|||||||
file://rust-${PV}/0007-mk-install-use-disable-rewrite-paths.patch \
|
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}/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}/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-${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 \
|
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