From a10ec437b1387e22a6d09211b4320d5330580f49 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Sat, 28 Jan 2023 17:39:12 +0000 Subject: rust: Upgrade 1.66.1 -> 1.67.0 Disable ZStd to avoid needing libzstd in llvm (mirrors zlib disable). Generate complete list of rust-snapshot artefacts from src/stage0.json. Drop clippy-driver reproducibility change as the code is gone from upstream. Release notes: https://releases.rs/docs/1.67.0/ License-Update: Unicode-TOU text added (already in our license string) (From OE-Core rev: 4900e0c5cb8a092a1d77d4f26249afa59b241da6) Signed-off-by: Alex Kiernan Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/libstd-rs_1.67.0.bb | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meta/recipes-devtools/rust/libstd-rs_1.67.0.bb (limited to 'meta/recipes-devtools/rust/libstd-rs_1.67.0.bb') diff --git a/meta/recipes-devtools/rust/libstd-rs_1.67.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.67.0.bb new file mode 100644 index 0000000000..f4e5abc0cc --- /dev/null +++ b/meta/recipes-devtools/rust/libstd-rs_1.67.0.bb @@ -0,0 +1,47 @@ +SUMMARY = "Rust standard libaries" +HOMEPAGE = "http://www.rust-lang.org" +SECTION = "devel" +LICENSE = "(MIT | Apache-2.0) & Unicode-TOU" +LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=c2cccf560306876da3913d79062a54b9" + +require rust-source.inc + +# Building with library/std omits proc_macro from the sysroot. Using +# library/test causes that to be installed which then allows cargo to +# build (https://github.com/meta-rust/meta-rust/issues/266) +S = "${RUSTSRC}/library/test" + +RUSTLIB_DEP = "" +inherit cargo + +DEPENDS:append:libc-musl = " libunwind" +# rv32 does not have libunwind ported yet +DEPENDS:remove:riscv32 = "libunwind" +DEPENDS:remove:riscv64 = "libunwind" + +# Embed bitcode in order to allow compiling both with and without LTO +RUSTFLAGS += "-Cembed-bitcode=yes" +# Needed so cargo can find libbacktrace +RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so" + +CARGO_FEATURES ?= "panic-unwind backtrace" +CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" +CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" + +do_compile:prepend () { + export CARGO_TARGET_DIR="${B}" + # For Rust 1.13.0 and newer + export RUSTC_BOOTSTRAP="1" +} + +do_install () { + mkdir -p ${D}${rustlibdir} + + # With the incremental build support added in 1.24, the libstd deps directory also includes dependency + # files that get installed. Those are really only needed to incrementally rebuild the libstd library + # itself and don't need to be installed. + rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d + cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} +} + +BBCLASSEXTEND = "nativesdk" -- cgit v1.2.3-54-g00ecf