diff options
author | Yash Shinde <Yash.Shinde@windriver.com> | 2024-08-08 03:00:34 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-09 22:33:38 +0100 |
commit | be70d81a3cc2775c38270653570e9089f0a68701 (patch) | |
tree | 6a4126dd08aaabcd8aba8dc452f0d4b7695e8d27 /meta/recipes-devtools/rust/cargo_1.76.0.bb | |
parent | ab1bd4a04bc7d392d3910cb9adf2f950508dd684 (diff) | |
download | poky-be70d81a3cc2775c38270653570e9089f0a68701.tar.gz |
rust: Upgrade 1.75.0->1.76.0
* Drop "--doc" option for rust oe-selftest since
it is not supported on bootstrap builds for
cross-targets.
* Drop the following backported patches which are merged
with rust v1.76 upgrade.
- custom-target-cfg.patch
- rustc-bootstrap.patch
- rv32-missing-syscalls.patch
- target-build-value.patch
https://blog.rust-lang.org/2024/02/08/Rust-1.76.0.html
* Drop 'rust-rustdoc' and 'rust-dbg' from 'exclude_packages' list
to check for rust reproducibility.
(From OE-Core rev: 71d17ed3c7be029fc68e9dd3f5d6c4aa72ef861a)
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/cargo_1.76.0.bb')
-rw-r--r-- | meta/recipes-devtools/rust/cargo_1.76.0.bb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/cargo_1.76.0.bb b/meta/recipes-devtools/rust/cargo_1.76.0.bb new file mode 100644 index 0000000000..123032cdf7 --- /dev/null +++ b/meta/recipes-devtools/rust/cargo_1.76.0.bb | |||
@@ -0,0 +1,73 @@ | |||
1 | SUMMARY = "Cargo, a package manager for Rust." | ||
2 | HOMEPAGE = "https://crates.io" | ||
3 | LICENSE = "MIT | Apache-2.0" | ||
4 | SECTION = "devel" | ||
5 | |||
6 | DEPENDS = "openssl zlib curl ca-certificates libssh2" | ||
7 | |||
8 | LIC_FILES_CHKSUM = " \ | ||
9 | file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \ | ||
10 | file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \ | ||
11 | file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \ | ||
12 | " | ||
13 | |||
14 | require rust-source.inc | ||
15 | require rust-snapshot.inc | ||
16 | |||
17 | S = "${RUSTSRC}/src/tools/cargo" | ||
18 | CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" | ||
19 | |||
20 | inherit cargo pkgconfig | ||
21 | |||
22 | DEBUG_PREFIX_MAP += "-fdebug-prefix-map=${RUSTSRC}/vendor=${TARGET_DBGSRC_DIR}" | ||
23 | |||
24 | do_cargo_setup_snapshot () { | ||
25 | ${UNPACKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig | ||
26 | # Need to use uninative's loader if enabled/present since the library paths | ||
27 | # are used internally by rust and result in symbol mismatches if we don't | ||
28 | if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then | ||
29 | patchelf-uninative ${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo --set-interpreter ${UNINATIVE_LOADER} | ||
30 | fi | ||
31 | } | ||
32 | |||
33 | addtask cargo_setup_snapshot after do_unpack before do_configure | ||
34 | do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}" | ||
35 | do_cargo_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" | ||
36 | |||
37 | |||
38 | do_compile:prepend () { | ||
39 | export RUSTC_BOOTSTRAP="1" | ||
40 | } | ||
41 | |||
42 | do_install () { | ||
43 | install -d "${D}${bindir}" | ||
44 | install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${D}${bindir}" | ||
45 | } | ||
46 | |||
47 | do_install:append:class-nativesdk() { | ||
48 | # To quote the cargo docs, "Cargo also sets the dynamic library path when compiling | ||
49 | # and running binaries with commands like `cargo run` and `cargo test`". Sadly it | ||
50 | # sets to libdir but not base_libdir leading to symbol mismatches depending on the | ||
51 | # host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this. | ||
52 | create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir} | ||
53 | } | ||
54 | |||
55 | # Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1) | ||
56 | # as shipped by Yocto Dunfell. | ||
57 | # According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between | ||
58 | # libgit2-sys and arbitrary system libgit2 versions, so better keep this turned off. | ||
59 | #export LIBGIT2_SYS_USE_PKG_CONFIG = "1" | ||
60 | |||
61 | # Needed for pkg-config to be used | ||
62 | export LIBSSH2_SYS_USE_PKG_CONFIG = "1" | ||
63 | |||
64 | # When building cargo-native we don't have cargo-native to use and depend on, | ||
65 | # so we must use the locally set up snapshot to bootstrap the build. | ||
66 | BASEDEPENDS:remove:class-native = "cargo-native" | ||
67 | CARGO:class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo" | ||
68 | |||
69 | DEPENDS:append:class-nativesdk = " nativesdk-rust" | ||
70 | RUSTLIB:append:class-nativesdk = " -L ${STAGING_DIR_HOST}/${SDKPATHNATIVE}/usr/lib/rustlib/${RUST_HOST_SYS}/lib" | ||
71 | RUSTLIB_DEP:class-nativesdk = "" | ||
72 | |||
73 | BBCLASSEXTEND = "native nativesdk" | ||