mirror of
https://git.yoctoproject.org/poky
synced 2026-02-14 12:43:03 +01:00
Rust stable version updated to 1.86.0. https://blog.rust-lang.org/2025/04/03/Rust-1.86.0.html * Add pkgconfig-native and openssl to resolve openssl-sys crate dependency on pkg-config. As per rust document this is a required dependency. Fixes: | error: failed to run custom build command for `openssl-sys v0.9.106` | Could not find openssl via pkg-config: | The pkg-config command could not be found. | | Most likely, you need to install a pkg-config package for your OS. | Try `apt install pkg-config`, or `yum install pkg-config`, | or `pkg install pkg-config`, or `apk add pkgconfig` depending on your distribution https://crates.io/crates/openssl-sys/0.9.108/dependencies https://github.com/rust-lang/rust/blob/master/INSTALL.md#dependencies * Add Ninja as a dependency for building Rust to prevent bootstrap build regression. Fixes: | Building LLD for x86_64-unknown-linux-gnu | | Couldn't find required command: ninja (or ninja-build) | | You should install ninja as described at | <https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages>, | or set `ninja = false` in the `[llvm]` section of `config.toml`. | Alternatively, set `download-ci-llvm = true` in that `[llvm]` section | to download LLVM rather than building it. * Add bash to DEPENDS to resolve missing dependency for subtree-sync.sh Fixes: ERROR: rust-1.86.0-r0 do_package_qa: QA Issue: /usr/lib/rustlib/src/rust/library/portable-simd/subtree-sync.sh contained in package rust requires /bin/bash, but no providers found in RDEPENDS:rust? [file-rdeps] * Add do_install:append() task to remove cargo bin from rust native builds. This resolves the following conflict: Fixes: ERROR: libstd-rs-1.86.0-r0 do_prepare_recipe_sysroot: The file /usr/bin/cargo is installed by both rust-native and cargo-native, aborting * Update Unicode-3.0 license checksums. License-Update: Copyright and license files to distributions are updated.f9c16997dcIt adds copyright and license files (including HTML versions) to distributions, aligns with license compliance tools like reuse, and ensures all required license texts are properly included and formatted. * Disable building of extended Rust tools to reduce build time and filesystem usage. Update config.toml to disable building of extended Rust tools that are not required. This helps minimize unnecessary build time and filesystem usage. * The "remote-test-server" bin is now generated in stage2-tools-bin dir rather than stage1. Update the test suite accordingly. * Fix do_package QA issue by packing missing zsh files and directories: Fixes: do_package: QA Issue: rust: Files/directories were installed but not shipped in any package: /usr/share/zsh /usr/share/zsh/site-functions /usr/share/zsh/site-functions/_cargo Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install * From v1.86.0, a "self-contained" LLD is built as part of rust bootstrap build. This results in additional build time and installations. Disable rust-lld in config.toml to prevent it. References: https://github.com/rust-lang/rust/pull/1350018744b44e6b* Drop Zdual-proc-macros-additional-check.patch patch since it's merged with v1.86.0139d6ba054* LTO config is applied to rustdoc from v1.86.0. Rebase 0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch which disables it to avoid suffixes in binaries causing non-reproducibility. https://github.com/rust-lang/rust/commit/1fe351b * Restrict tests using "//@only <target_arch>" to avoid failures on riscv64, which is now part of default AB testing. Since riscv64 is Tier 2 with no automated testing, some tests may fail. This approach ensures tests continue running on supported architectures while skipping them on riscv64. https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools (From OE-Core rev: c064ef18343a956aea397d36d2e7665d6c8afd7d) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
53 lines
1.7 KiB
BlitzBasic
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"
|