fix some instalation and paths, rustc --target ${TARGET_SYS} now just fails to find std
This commit is contained in:
@@ -3,7 +3,6 @@ inherit cross
|
||||
# Otherwise we'll depend on what we provide
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
|
||||
DEPENDS += "virtual/${TARGET_PREFIX}gcc rust-native"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}rust"
|
||||
PN = "rust-cross-${TARGET_ARCH}"
|
||||
@@ -15,3 +14,8 @@ PN = "rust-cross-${TARGET_ARCH}"
|
||||
|
||||
# TODO: use rust-native instead of a snapshot
|
||||
EXTRA_OECONF += ""
|
||||
|
||||
# cross.bbclass is "helpful" and overrides our do_install. Tell it not to.
|
||||
do_install () {
|
||||
rust_do_install
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
RUSTC = "rustc"
|
||||
|
||||
# FIXME: --sysroot might be needed
|
||||
RUSTC_ARCHFLAGS += "--target=${TARGET_SYS} -C rpath"
|
||||
|
||||
def rust_base_dep(d):
|
||||
@@ -32,7 +34,9 @@ RUST_PATH_NATIVE="${STAGING_LIBDIR_NATIVE}:${STAGING_BASE_LIBDIR_NATIVE}"
|
||||
export RUST_PATH ??= "${RUST_PATH_NATIVE}"
|
||||
|
||||
# FIXME: set this to something (sysroot?) for each of target,native,cross
|
||||
export RUST_TARGET_PATH = "${datadir}/rust/target"
|
||||
# For now, tuned so target builds are correct. -native happens to work because
|
||||
# the target specs happen to match.
|
||||
export RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/rust/targets"
|
||||
|
||||
CARGO = "cargo"
|
||||
|
||||
|
||||
@@ -283,16 +283,20 @@ do_compile () {
|
||||
rust_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
rust_do_install () {
|
||||
rust_runmake DESTDIR="${D}" install
|
||||
|
||||
local td="${D}${datadir}/rust/targets/"
|
||||
local td="${D}${libdir}/rust/targets/"
|
||||
install -d "$td"
|
||||
for tgt in "${WORKDIR}/targets/"* ; do
|
||||
install -m 0644 "$tgt" "$td"
|
||||
done
|
||||
}
|
||||
|
||||
do_install () {
|
||||
rust_do_install
|
||||
}
|
||||
|
||||
# FIXME: use FILES to create a -runtime (not -native) package
|
||||
# $PREFIX/lib/rustlib/`rust_triple`/lib/* contains the runtime libraries (and rlibs)
|
||||
# Need to copy the *.so files to the appropriate target path
|
||||
|
||||
Reference in New Issue
Block a user