summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/rust-cross-canadian-common.inc
diff options
context:
space:
mode:
authorRandy MacLeod <Randy.MacLeod@windriver.com>2021-08-10 13:52:19 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-26 22:09:43 +0100
commit61e1570c6a09c1984e919e8c0a82a74c1a08d821 (patch)
treeaccab4b08aa3c62f098c9bb19399efb46906256a /meta/recipes-devtools/rust/rust-cross-canadian-common.inc
parent705b1d757fa221614f4f72cabf0fac5884cb6bfd (diff)
downloadpoky-61e1570c6a09c1984e919e8c0a82a74c1a08d821.tar.gz
rust: initial merge of most of meta-rust
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>
Diffstat (limited to 'meta/recipes-devtools/rust/rust-cross-canadian-common.inc')
-rw-r--r--meta/recipes-devtools/rust/rust-cross-canadian-common.inc53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc
new file mode 100644
index 0000000000..c5d56bbeb4
--- /dev/null
+++ b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc
@@ -0,0 +1,53 @@
1
2RUST_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config"
3
4require rust-target.inc
5
6inherit cross-canadian
7
8DEPENDS += " \
9 virtual/${HOST_PREFIX}gcc-crosssdk \
10 virtual/nativesdk-libc rust-llvm-native \
11 virtual/${TARGET_PREFIX}compilerlibs \
12 virtual/nativesdk-${HOST_PREFIX}compilerlibs \
13 gcc-cross-${TARGET_ARCH} \
14 "
15
16# The host tools are likely not to be able to do the necessary operation on
17# the target architecturea. Alternatively one could check compatibility
18# between host/target.
19EXCLUDE_FROM_SHLIBS_${RUSTLIB_TARGET_PN} = "1"
20
21DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
22 -fdebug-prefix-map=${STAGING_DIR_HOST}= \
23 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
24 "
25
26LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}"
27python do_rust_gen_targets () {
28 wd = d.getVar('WORKDIR') + '/targets/'
29 rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
30 rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
31 rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
32}
33
34INHIBIT_DEFAULT_RUST_DEPS = "1"
35
36export WRAPPER_TARGET_CC = "${CCACHE}${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TARGET_CC_ARCH} ${SECURITY_NOPIE_CFLAGS}"
37export WRAPPER_TARGET_CXX = "${CCACHE}${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TARGET_CC_ARCH} ${SECURITY_NOPIE_CFLAGS}"
38export WRAPPER_TARGET_CCLD = "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TARGET_CC_ARCH} ${SECURITY_NOPIE_CFLAGS}"
39export WRAPPER_TARGET_LDFLAGS = "${TARGET_LDFLAGS}"
40export WRAPPER_TARGET_AR = "${TARGET_PREFIX}ar"
41
42python do_configure:prepend() {
43 targets = [d.getVar("TARGET_SYS", True), "{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))]
44 hosts = ["{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))]
45}
46
47INSANE_SKIP:${RUSTLIB_TARGET_PN} = "file-rdeps arch ldflags"
48SKIP_FILEDEPS:${RUSTLIB_TARGET_PN} = "1"
49
50INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
51INHIBIT_PACKAGE_STRIP = "1"
52INHIBIT_SYSROOT_STRIP = "1"
53