diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2023-12-08 14:03:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-13 11:49:42 +0000 |
commit | 93292feac47b1bced1d9012626b413c96703ee9e (patch) | |
tree | 87898d89ad577f790a7f26746fcb37c3180e58a3 /meta/recipes-devtools/rust/libstd-rs_1.71.0.bb | |
parent | 7a20381430f7343eb452245c15145bc0ef40a146 (diff) | |
download | poky-93292feac47b1bced1d9012626b413c96703ee9e.tar.gz |
rust: Upgrade 1.70.0 -> 1.71.0
Switch libstd-rs to use the dummy `sysroot` crate which represents the
standard library crates. Target getrandom-open64.patch at 0.2.8 (merged
for 0.2.9). Drop bootstrap_fail.patch (backport merged).
https://blog.rust-lang.org/2023/07/13/Rust-1.71.0.html
(From OE-Core rev: c3eba94ee44adcd3a0aa61f6b087c15c02e4697f)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/libstd-rs_1.71.0.bb')
-rw-r--r-- | meta/recipes-devtools/rust/libstd-rs_1.71.0.bb | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/libstd-rs_1.71.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.71.0.bb new file mode 100644 index 0000000000..d2bf266f9d --- /dev/null +++ b/meta/recipes-devtools/rust/libstd-rs_1.71.0.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | SUMMARY = "Rust standard libaries" | ||
2 | HOMEPAGE = "http://www.rust-lang.org" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "(MIT | Apache-2.0) & Unicode-TOU" | ||
5 | LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=c2cccf560306876da3913d79062a54b9" | ||
6 | |||
7 | require 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/ | ||
13 | S = "${RUSTSRC}/library/sysroot" | ||
14 | |||
15 | RUSTLIB_DEP = "" | ||
16 | inherit cargo | ||
17 | |||
18 | DEPENDS:append:libc-musl = " libunwind" | ||
19 | # rv32 does not have libunwind ported yet | ||
20 | DEPENDS:remove:riscv32 = "libunwind" | ||
21 | DEPENDS:remove:riscv64 = "libunwind" | ||
22 | |||
23 | # Embed bitcode in order to allow compiling both with and without LTO | ||
24 | RUSTFLAGS += "-Cembed-bitcode=yes" | ||
25 | # Needed so cargo can find libbacktrace | ||
26 | RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so" | ||
27 | |||
28 | CARGO_FEATURES ?= "panic-unwind backtrace" | ||
29 | CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" | ||
30 | CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" | ||
31 | |||
32 | do_compile:prepend () { | ||
33 | export CARGO_TARGET_DIR="${B}" | ||
34 | # For Rust 1.13.0 and newer | ||
35 | export RUSTC_BOOTSTRAP="1" | ||
36 | } | ||
37 | |||
38 | do_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 | |||
48 | BBCLASSEXTEND = "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 | ||
53 | LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" | ||