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"
|
||||
# ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_NATIVE}${target_includedir}"
|
||||
|
||||
|
||||
# TODO: use rust-native instead of a snapshot
|
||||
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"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
|
||||
DEPENDS = "rust cargo"
|
||||
DEPENDS = "cargo-native"
|
||||
|
||||
inherit rust
|
||||
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 \
|
||||
"
|
||||
|
||||
# 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/"
|
||||
|
||||
## arm-unknown-linux-gnueabihf
|
||||
@@ -232,19 +236,23 @@ do_configure () {
|
||||
|
||||
# rpath is required otherwise rustc fails to resolve symbols
|
||||
|
||||
${S}/configure \
|
||||
"--enable-rpath" \
|
||||
"--disable-verify-install" \
|
||||
"--prefix=${prefix}" \
|
||||
"--target=${TARGET_SYS}" \
|
||||
"--host=${HOST_SYS}" \
|
||||
"--build=${BUILD_SYS}" \
|
||||
"--localstatedir=${localstatedir}" \
|
||||
"--sysconfdir=${sysconfdir}" \
|
||||
"--datadir=${datadir}" \
|
||||
"--infodir=${infodir}" \
|
||||
"--mandir=${mandir}" \
|
||||
"--libdir=${libdir}"
|
||||
# TODO: consider setting --local-rust-root for -cross and -target
|
||||
# builds.
|
||||
${S}/configure \
|
||||
"--enable-rpath" \
|
||||
"--disable-verify-install" \
|
||||
"--prefix=${prefix}" \
|
||||
"--target=${TARGET_SYS}" \
|
||||
"--host=${HOST_SYS}" \
|
||||
"--build=${BUILD_SYS}" \
|
||||
"--localstatedir=${localstatedir}" \
|
||||
"--sysconfdir=${sysconfdir}" \
|
||||
"--datadir=${datadir}" \
|
||||
"--infodir=${infodir}" \
|
||||
"--mandir=${mandir}" \
|
||||
"--libdir=${libdir}" \
|
||||
${@base_conditional('USE_LOCAL_RUST', '1', '--enable-local-rust', '', d)} \
|
||||
${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
rust_runmake () {
|
||||
@@ -281,9 +289,16 @@ do_install () {
|
||||
# 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}/
|
||||
|
||||
# cross-canadian: llvm configure fails for host while attempting to build host-only llvm
|
||||
BBCLASSEXTEND = "rust-cross native"
|
||||
## We abuse the BBCLASSEXTEND system to avoid creating multiple .bb for every
|
||||
## 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 () {
|
||||
# classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
|
||||
# if "cross" not in classextend:
|
||||
|
||||
@@ -4,4 +4,5 @@ require rust-git.inc
|
||||
SRC_URI_append = "\
|
||||
file://0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch \
|
||||
file://0001-get-snapshot-debug.patch \
|
||||
file://0001-platform.mk-avoid-choking-on-i586.patch \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user