mirror of
git://git.yoctoproject.org/poky.git
synced 2025-08-22 00:42:05 +02:00

In the meta-rust repo at commit: 448047c Upgrade to 1.54.0 (#359) Make the required directories: mkdir ../oe-core/meta/recipes-devtools/rust mkdir ../oe-core/meta/recipes-devtools/cargo mkdir ../oe-core/meta/recipes-example and then: cp recipes-devtools/rust/* ../oe-core/meta/recipes-devtools/rust cp recipes-devtools/cargo/* ../oe-core/meta/recipes-devtools/cargo cp lib/crate.py ../oe-core/meta/lib cp recipes-example/* ../oe-core/meta/recipes-example cp conf/distro/include/rust_* ../oe-core/meta/conf/distro/include/ cp classes/* ../oe-core/meta/classes/ cp recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb ../oe-core/meta/recipes-core/packagegroups (From OE-Core rev: 3ed57578cca93ff1ba4e0bf3f25566e10659a2f9) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
inherit rust-common
|
|
|
|
RUSTC = "rustc"
|
|
|
|
RUSTC_ARCHFLAGS += "--target=${HOST_SYS} ${RUSTFLAGS}"
|
|
|
|
def rust_base_dep(d):
|
|
# Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to
|
|
# use rust instead of gcc
|
|
deps = ""
|
|
if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'):
|
|
if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')):
|
|
deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}"
|
|
else:
|
|
deps += " rust-native"
|
|
return deps
|
|
|
|
DEPENDS:append = " ${@rust_base_dep(d)}"
|
|
|
|
# BUILD_LDFLAGS
|
|
# ${STAGING_LIBDIR_NATIVE}
|
|
# ${STAGING_BASE_LIBDIR_NATIVE}
|
|
# BUILDSDK_LDFLAGS
|
|
# ${STAGING_LIBDIR}
|
|
# #{STAGING_DIR_HOST}
|
|
# TARGET_LDFLAGS ?????
|
|
#RUSTC_BUILD_LDFLAGS = "\
|
|
# --sysroot ${STAGING_DIR_NATIVE} \
|
|
# -L${STAGING_LIBDIR_NATIVE} \
|
|
# -L${STAGING_BASE_LIBDIR_NATIVE} \
|
|
#"
|
|
|
|
# XXX: for some reason bitbake sets BUILD_* & TARGET_* but uses the bare
|
|
# variables for HOST. Alias things to make it easier for us.
|
|
HOST_LDFLAGS ?= "${LDFLAGS}"
|
|
HOST_CFLAGS ?= "${CFLAGS}"
|
|
HOST_CXXFLAGS ?= "${CXXFLAGS}"
|
|
HOST_CPPFLAGS ?= "${CPPFLAGS}"
|
|
|
|
rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
|
|
# Native sysroot standard library path
|
|
rustlib_src="${prefix}/lib/${rustlib_suffix}"
|
|
# Host sysroot standard library path
|
|
rustlib="${libdir}/${rustlib_suffix}"
|
|
rustlib:class-native="${libdir}/rustlib/${BUILD_SYS}/lib"
|