Files
poky/meta/recipes-devtools/rust/libstd-rs_1.89.0.bb
Jayasurya Maganuru 917430ed34 rust: Upgrade 1.88.0 -> 1.89.0
Rust stable version upgraded to 1.89.0
https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/

* Drop merged patches with rust v1.89.0.
  - 0001-Disable-libunwind-cross-architecture-unwinding.patch
  - triagebot.patch

* Update and rebase existing patches with rust v1.89.0.
  - revert-link-std-statically-in-rustc_driver-feature.patch
  - rust-oe-selftest.patch
  - 0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch
  - 0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch
    (To fix build failures for riscv with musl, this patch adds
     aliases for plain syscalls to their time64 variants in libc-0.2.174,
     These changes are in addition to similar fixes already applied
     to libc-0.2.172)
  - 0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch
    (Changes for libc-0.2.170 are no longer needed, as that version
     is not present in rust v1.89.0 vendor sources)

* OE-selftests:
  - Doc-tests fail in 55 crates,test-float-parse tests also fail.
    These tests are excluded to ensure the overall test suite passes.

   Test Results Summary:
   +-----------+--------+---------+
   | Machine   | Passed | Ignored |
   +-----------+--------+---------+
   | arm-32    | 29,239 | 1,468   |
   | arm-64    | 29,329 | 1,412   |
   | x86-32    | 29,231 | 1,449   |
   | x86-64    | 29,484 | 1,225   |
   | riscv-64  | 29,304 | 1,436   |
   +-----------+--------+---------+

(From OE-Core rev: fca454a188592c9fa854e93ff1a9c3e70a681e23)

Signed-off-by: Jayasurya Maganuru <Maganuru.Jayasurya@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-08-28 10:47:08 +01:00

53 lines
1.7 KiB
BlitzBasic

SUMMARY = "Rust standard libaries"
HOMEPAGE = "http://www.rust-lang.org"
SECTION = "devel"
LICENSE = "(MIT | Apache-2.0) & Unicode-3.0"
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=11a3899825f4376896e438c8c753f8dc"
require rust-source.inc
# The dummy crate named `sysroot` represents the standard library target.
#
# See fd4c81f4c19e ("Add a `sysroot` crate to represent the standard library crates")
# https://github.com/rust-lang/rust/pull/108865/
S = "${RUSTSRC}/library/sysroot"
RUSTLIB_DEP = ""
inherit cargo
CVE_PRODUCT = "rust"
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"
# Ensure that user code can't access the dependencies of the standard library
RUSTFLAGS += "-Zforce-unstable-if-unmarked"
# 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"