diff options
| author | Yash Shinde <Yash.Shinde@windriver.com> | 2024-08-16 08:54:11 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-20 11:55:36 +0100 |
| commit | f0b62cf9a8f4be863b4658b8c914c42369638d37 (patch) | |
| tree | ac321aef67ee29ec24c528ede04f0c8da70a53dd /meta/recipes-devtools/rust/libstd-rs_1.78.0.bb | |
| parent | c089b5d3a80f819b3816f2729e17e42494dbca06 (diff) | |
| download | poky-f0b62cf9a8f4be863b4658b8c914c42369638d37.tar.gz | |
rust: Upgrade 1.77.2->1.78.0
* Drop the following backported patches which are merged
with rust v1.78 upgrade.
- 0001-Revert-Map-source-absolute-paths-to-OUT_DIR-as-relat.patch
- repro-issue-fix-with-v175.patch
- deadcode-backport.patch
https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html
(From OE-Core rev: a3fb378afcc1fb01e9813fe902dbd6090ded75d7)
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.78.0.bb')
| -rw-r--r-- | meta/recipes-devtools/rust/libstd-rs_1.78.0.bb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/libstd-rs_1.78.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.78.0.bb new file mode 100644 index 0000000000..14161714f2 --- /dev/null +++ b/meta/recipes-devtools/rust/libstd-rs_1.78.0.bb | |||
| @@ -0,0 +1,55 @@ | |||
| 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 | CVE_PRODUCT = "rust" | ||
| 19 | |||
| 20 | DEPENDS:append:libc-musl = " libunwind" | ||
| 21 | # rv32 does not have libunwind ported yet | ||
| 22 | DEPENDS:remove:riscv32 = "libunwind" | ||
| 23 | DEPENDS:remove:riscv64 = "libunwind" | ||
| 24 | |||
| 25 | # Embed bitcode in order to allow compiling both with and without LTO | ||
| 26 | RUSTFLAGS += "-Cembed-bitcode=yes" | ||
| 27 | # Needed so cargo can find libbacktrace | ||
| 28 | RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so" | ||
| 29 | |||
| 30 | CARGO_FEATURES ?= "panic-unwind backtrace" | ||
| 31 | CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" | ||
| 32 | CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" | ||
| 33 | |||
| 34 | do_compile:prepend () { | ||
| 35 | export CARGO_TARGET_DIR="${B}" | ||
| 36 | # For Rust 1.13.0 and newer | ||
| 37 | export RUSTC_BOOTSTRAP="1" | ||
| 38 | } | ||
| 39 | |||
| 40 | do_install () { | ||
| 41 | mkdir -p ${D}${rustlibdir} | ||
| 42 | |||
| 43 | # With the incremental build support added in 1.24, the libstd deps directory also includes dependency | ||
| 44 | # files that get installed. Those are really only needed to incrementally rebuild the libstd library | ||
| 45 | # itself and don't need to be installed. | ||
| 46 | rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d | ||
| 47 | cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} | ||
| 48 | } | ||
| 49 | |||
| 50 | BBCLASSEXTEND = "nativesdk" | ||
| 51 | |||
| 52 | # Since 1.70.0 upgrade this fails to build with gold: | ||
| 53 | # http://errors.yoctoproject.org/Errors/Details/708194/ | ||
| 54 | # ld: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined | ||
| 55 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-fuse-ld=bfd', '', d)}" | ||
