multiple fixes
- avoid choking in morestack on i586, - fixup dependencies - rename rust-cross to internal-rust-cross (in the hope the people are less likely to try to inherit it when they shouldn't) - enable-local-rust for -target and -cross builds
This commit is contained in:
@@ -13,6 +13,5 @@ PN = "rust-cross-${TARGET_ARCH}"
|
|||||||
# INHIBIT_PACKAGE_STRIP = "1"
|
# INHIBIT_PACKAGE_STRIP = "1"
|
||||||
# ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_NATIVE}${target_includedir}"
|
# ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_NATIVE}${target_includedir}"
|
||||||
|
|
||||||
|
|
||||||
# TODO: use rust-native instead of a snapshot
|
# TODO: use rust-native instead of a snapshot
|
||||||
EXTRA_OECONF += ""
|
EXTRA_OECONF += ""
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
inherit native
|
||||||
|
PN = "rust-native"
|
||||||
|
|
||||||
|
USE_LOCAL_NATIVE_RUST ??= "0"
|
||||||
|
USE_LOCAL_RUST = "${base_conditional('USE_LOCAL_NATIVE_RUST', '0', '0', '1')}"
|
||||||
@@ -6,7 +6,7 @@ SUMMARY = "Hello World by Cargo for Rust"
|
|||||||
HOMEPAGE = "https://github.com/jmesmon/rust-hello-world"
|
HOMEPAGE = "https://github.com/jmesmon/rust-hello-world"
|
||||||
LICENSE = "MIT | Apache-2.0"
|
LICENSE = "MIT | Apache-2.0"
|
||||||
|
|
||||||
DEPENDS = "rust cargo"
|
DEPENDS = "cargo-native"
|
||||||
|
|
||||||
inherit rust
|
inherit rust
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From fead6879b81ca4a15116a572ae286a6cb0b071c0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Sat, 15 Nov 2014 20:12:48 -0500
|
||||||
|
Subject: [PATCH] platform.mk: avoid choking on i586
|
||||||
|
|
||||||
|
---
|
||||||
|
mk/platform.mk | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mk/platform.mk b/mk/platform.mk
|
||||||
|
index 6da01ef..ee83f66 100644
|
||||||
|
--- a/mk/platform.mk
|
||||||
|
+++ b/mk/platform.mk
|
||||||
|
@@ -14,7 +14,9 @@
|
||||||
|
# would create a variable HOST_i686-darwin-macos with the value
|
||||||
|
# i386.
|
||||||
|
define DEF_HOST_VAR
|
||||||
|
- HOST_$(1) = $(subst i686,i386,$(word 1,$(subst -, ,$(1))))
|
||||||
|
+ HOST_$(1) = $(subst i686,i386,\
|
||||||
|
+ $(subst i586,i386,\
|
||||||
|
+ $(word 1,$(subst -, ,$(1)))))
|
||||||
|
endef
|
||||||
|
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_HOST_VAR,$(t))))
|
||||||
|
$(foreach t,$(CFG_TARGET),$(info cfg: host for $(t) is $(HOST_$(t))))
|
||||||
|
--
|
||||||
|
2.0.4
|
||||||
|
|
||||||
+30
-15
@@ -11,6 +11,10 @@ LIC_FILES_CHKSUM ="\
|
|||||||
file://COPYRIGHT;md5=0e8e4a3b5d8e1c90eb243d406369763a \
|
file://COPYRIGHT;md5=0e8e4a3b5d8e1c90eb243d406369763a \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
# Controls whether we use the local rust.
|
||||||
|
# For -native, we set this to "0" by default.
|
||||||
|
USE_LOCAL_RUST = "1"
|
||||||
|
|
||||||
export RUST_TARGET_PATH="${WORKDIR}/targets/"
|
export RUST_TARGET_PATH="${WORKDIR}/targets/"
|
||||||
|
|
||||||
## arm-unknown-linux-gnueabihf
|
## arm-unknown-linux-gnueabihf
|
||||||
@@ -232,19 +236,23 @@ do_configure () {
|
|||||||
|
|
||||||
# rpath is required otherwise rustc fails to resolve symbols
|
# rpath is required otherwise rustc fails to resolve symbols
|
||||||
|
|
||||||
${S}/configure \
|
# TODO: consider setting --local-rust-root for -cross and -target
|
||||||
"--enable-rpath" \
|
# builds.
|
||||||
"--disable-verify-install" \
|
${S}/configure \
|
||||||
"--prefix=${prefix}" \
|
"--enable-rpath" \
|
||||||
"--target=${TARGET_SYS}" \
|
"--disable-verify-install" \
|
||||||
"--host=${HOST_SYS}" \
|
"--prefix=${prefix}" \
|
||||||
"--build=${BUILD_SYS}" \
|
"--target=${TARGET_SYS}" \
|
||||||
"--localstatedir=${localstatedir}" \
|
"--host=${HOST_SYS}" \
|
||||||
"--sysconfdir=${sysconfdir}" \
|
"--build=${BUILD_SYS}" \
|
||||||
"--datadir=${datadir}" \
|
"--localstatedir=${localstatedir}" \
|
||||||
"--infodir=${infodir}" \
|
"--sysconfdir=${sysconfdir}" \
|
||||||
"--mandir=${mandir}" \
|
"--datadir=${datadir}" \
|
||||||
"--libdir=${libdir}"
|
"--infodir=${infodir}" \
|
||||||
|
"--mandir=${mandir}" \
|
||||||
|
"--libdir=${libdir}" \
|
||||||
|
${@base_conditional('USE_LOCAL_RUST', '1', '--enable-local-rust', '', d)} \
|
||||||
|
${EXTRA_OECONF}
|
||||||
}
|
}
|
||||||
|
|
||||||
rust_runmake () {
|
rust_runmake () {
|
||||||
@@ -281,9 +289,16 @@ do_install () {
|
|||||||
# Need to copy the *.so files to the appropriate target path
|
# Need to copy the *.so files to the appropriate target path
|
||||||
# cp $prefix/lib/rustlib/`rust_triple "${TARGET_ARCH}" "${TARGET_VENDOR}" "${TARGET_OS}"`/lib/*.so ${target_libdir}/
|
# cp $prefix/lib/rustlib/`rust_triple "${TARGET_ARCH}" "${TARGET_VENDOR}" "${TARGET_OS}"`/lib/*.so ${target_libdir}/
|
||||||
|
|
||||||
# cross-canadian: llvm configure fails for host while attempting to build host-only llvm
|
## We abuse the BBCLASSEXTEND system to avoid creating multiple .bb for every
|
||||||
BBCLASSEXTEND = "rust-cross native"
|
## rust version (which is what gcc does).
|
||||||
|
##
|
||||||
|
## Right now 'target' doesn't need any special settings, but at some point we may need to:
|
||||||
|
## - add an internal-rust-target
|
||||||
|
## - set the PN of this package to something like "rust-internal" or otherwise
|
||||||
|
## make the base unbuildable.
|
||||||
|
BBCLASSEXTEND = "internal-rust-cross internal-rust-native"
|
||||||
|
|
||||||
|
## This is a hack to have -cross provide -native, which doesn't quite work
|
||||||
#python cross_virtclass_provides_native_handler () {
|
#python cross_virtclass_provides_native_handler () {
|
||||||
# classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
|
# classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
|
||||||
# if "cross" not in classextend:
|
# if "cross" not in classextend:
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ require rust-git.inc
|
|||||||
SRC_URI_append = "\
|
SRC_URI_append = "\
|
||||||
file://0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch \
|
file://0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch \
|
||||||
file://0001-get-snapshot-debug.patch \
|
file://0001-get-snapshot-debug.patch \
|
||||||
|
file://0001-platform.mk-avoid-choking-on-i586.patch \
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user