diff options
| author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2021-08-10 13:52:19 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-26 22:09:43 +0100 |
| commit | 61e1570c6a09c1984e919e8c0a82a74c1a08d821 (patch) | |
| tree | accab4b08aa3c62f098c9bb19399efb46906256a /meta/recipes-devtools/rust/libstd-rs.inc | |
| parent | 705b1d757fa221614f4f72cabf0fac5884cb6bfd (diff) | |
| download | poky-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/libstd-rs.inc')
| -rw-r--r-- | meta/recipes-devtools/rust/libstd-rs.inc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc new file mode 100644 index 0000000000..987956344a --- /dev/null +++ b/meta/recipes-devtools/rust/libstd-rs.inc | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | SUMMARY = "Rust standard libaries" | ||
| 2 | HOMEPAGE = "http://www.rust-lang.org" | ||
| 3 | SECTION = "devel" | ||
| 4 | LICENSE = "MIT | Apache-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" | ||
| 6 | |||
| 7 | RUSTLIB_DEP = "" | ||
| 8 | inherit cargo | ||
| 9 | |||
| 10 | DEPENDS:append:libc-musl = " libunwind" | ||
| 11 | # rv32 does not have libunwind ported yet | ||
| 12 | DEPENDS:remove:riscv32 = "libunwind" | ||
| 13 | DEPENDS:remove:riscv64 = "libunwind" | ||
| 14 | |||
| 15 | # Embed bitcode in order to allow compiling both with and without LTO | ||
| 16 | RUSTFLAGS += "-Cembed-bitcode=yes" | ||
| 17 | # Needed so cargo can find libbacktrace | ||
| 18 | RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so" | ||
| 19 | |||
| 20 | S = "${RUSTSRC}/src/libstd" | ||
| 21 | |||
| 22 | CARGO_FEATURES ?= "panic-unwind backtrace" | ||
| 23 | CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" | ||
| 24 | CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" | ||
| 25 | |||
| 26 | do_compile:prepend () { | ||
| 27 | export CARGO_TARGET_DIR="${B}" | ||
| 28 | # For Rust 1.13.0 and newer | ||
| 29 | export RUSTC_BOOTSTRAP="1" | ||
| 30 | } | ||
| 31 | |||
| 32 | do_install () { | ||
| 33 | mkdir -p ${D}${rustlibdir} | ||
| 34 | |||
| 35 | # With the incremental build support added in 1.24, the libstd deps directory also includes dependency | ||
| 36 | # files that get installed. Those are really only needed to incrementally rebuild the libstd library | ||
| 37 | # itself and don't need to be installed. | ||
| 38 | rm -f ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/*.d | ||
| 39 | cp ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} | ||
| 40 | } | ||
