summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb
diff options
context:
space:
mode:
authorYash Shinde <Yash.Shinde@windriver.com>2024-02-29 08:32:40 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-01 09:31:10 +0000
commita62cee4479d63a9dd749a2a553823b76fb698ff6 (patch)
treed4b40bac76816e3620aa8f6fdc8c6693b57fee64 /meta/recipes-devtools/rust/libstd-rs_1.75.0.bb
parent423d7f208d1f6fa75877fd28a08d6a211ab5d83b (diff)
downloadpoky-a62cee4479d63a9dd749a2a553823b76fb698ff6.tar.gz
rust: Upgrade 1.74.1 -> 1.75.0
* Drop backported musl fixes. * Set `change-id` rather than `changelog-seen` to fix build warning. * Add fixes for 4b7e0a0b56aa24 ("Handle vendored sources when remapping paths") which otherwise cause build failures: | thread 'main' panicked at src/core/builder.rs:1795:26: | std::fs::read_dir(registry_src) failed with No such file or directory (os= error 2) https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html (From OE-Core rev: 9aec2c6c777388bb3129aa4c4f27a40f912522b4) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/libstd-rs_1.75.0.bb')
-rw-r--r--meta/recipes-devtools/rust/libstd-rs_1.75.0.bb53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb
new file mode 100644
index 0000000000..d2bf266f9d
--- /dev/null
+++ b/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb
@@ -0,0 +1,53 @@
1SUMMARY = "Rust standard libaries"
2HOMEPAGE = "http://www.rust-lang.org"
3SECTION = "devel"
4LICENSE = "(MIT | Apache-2.0) & Unicode-TOU"
5LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=c2cccf560306876da3913d79062a54b9"
6
7require rust-source.inc
8
9# The dummy crate named `sysroot` represents the standard library target.
10#
11# See fd4c81f4c19e ("Add a `sysroot` crate to represent the standard library crates")
12# https://github.com/rust-lang/rust/pull/108865/
13S = "${RUSTSRC}/library/sysroot"
14
15RUSTLIB_DEP = ""
16inherit cargo
17
18DEPENDS:append:libc-musl = " libunwind"
19# rv32 does not have libunwind ported yet
20DEPENDS:remove:riscv32 = "libunwind"
21DEPENDS:remove:riscv64 = "libunwind"
22
23# Embed bitcode in order to allow compiling both with and without LTO
24RUSTFLAGS += "-Cembed-bitcode=yes"
25# Needed so cargo can find libbacktrace
26RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
27
28CARGO_FEATURES ?= "panic-unwind backtrace"
29CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
30CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
31
32do_compile:prepend () {
33 export CARGO_TARGET_DIR="${B}"
34 # For Rust 1.13.0 and newer
35 export RUSTC_BOOTSTRAP="1"
36}
37
38do_install () {
39 mkdir -p ${D}${rustlibdir}
40
41 # With the incremental build support added in 1.24, the libstd deps directory also includes dependency
42 # files that get installed. Those are really only needed to incrementally rebuild the libstd library
43 # itself and don't need to be installed.
44 rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
45 cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
46}
47
48BBCLASSEXTEND = "nativesdk"
49
50# Since 1.70.0 upgrade this fails to build with gold:
51# http://errors.yoctoproject.org/Errors/Details/708194/
52# ld: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
53LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}"