Rust stable version updated to 1.87.0.
https://blog.rust-lang.org/2025/05/15/Rust-1.87.0/
* Update LLVM data-layout for arm64.
LLVM requires matching data layouts and
the aarch64 llvm data-layout was updated to to allow using
32-bit signed/unsigned pointers when building 64-bit targets
using 270, 271 and 272 address spaces.
e985396145c9f27275c1
* Rebase existing patches with v1.87.0.
* Two tests from the `ui` and `codegen` modules now fail only on riscv64.
Enable them on arm32/64 and x86-32/64 targets, while restricting
them on riscv64 via `only-<target_arch>` tags.
Test Results Summary:
+-----------+--------+---------+
| Machine | Passed | Ignored |
+-----------+--------+---------+
| arm-32 | 28,320 | 901 |
| arm-64 | 28,400 | 849 |
| x86-32 | 28,285 | 885 |
| x86-64 | 28,518 | 676 |
| riscv-64 | 27,845 | 868 |
+-----------+--------+---------+
* Backport triagebot.patch to skip tidy linkcheck when triagebot.toml
is not present. Distribution tarballs won't include triagebot.toml,
which causes tidy checks to fail.
This backport ensures tidy checks can still run successfully
even when the file is missing.
https://github.com/rust-lang/rust/pull/142666/commits
* During rust installation, some binaries were installed from
'stage2-tools' built path to '${D}${bindir}'. However, from
v1.87 the stage2-tools are no longer built by default.
Update logic to install from `stage1-tools` instead.
(From OE-Core rev: 16ce25e6970b4a50f6433606a0c87d22ec74ea5a)
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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/dependencieshttps://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.
f9c16997dc
It 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.0
139d6ba054
* 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>
Rust stable version updated to 1.85.0
https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html
Some of the major updates:
- Update LIC_FILES_CHKSUM in libstd-rs and rust recipes.
License-Update: Unicode license text is updated to Unicode-3.0 License.
6d2a3e9786
[RP: Update LICENSE to reference Unicode-3.0]
- Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb
Fix: https://github.com/rust-lang/rust/issues/133857#issuecomment-2526341227
- Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1)
Fix: e4ca11f87f
- Explicitly set float ABI for all ARM 32 bits targets.
Fix: a51fefcaab
- Rust v1.85.0 tarball doesn't ship gcc tree.
Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat.
Fix: 13c3f9b949
Adapted the patch changes with v1.85.0:
repro-issue-fix-with-cc-crate-hashmap.patch
revert-link-std-statically-in-rustc_driver-feature.patch
rust-oe-selftest.patch
rv32-cargo-rustix-0.38.40-fix.patch
Dropped patches:
fix-tidy-check-failure.patch since it's merged with v1.85.0.
(From OE-Core rev: 3130069fdebb92f20b962fa8074564a27c3fb6b9)
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.84.1.
https://blog.rust-lang.org/2025/01/30/Rust-1.84.1.html
Renamed and modified the below patch to adapt the new version.
rv32-cargo-rustix-0.38.37-fix.patch->rv32-cargo-rustix-0.38.38-fix.patch
Modified the below patches to adapt the new version.
repro-issue-fix-with-cc-crate-hashmap.patch
revert-link-std-statically-in-rustc_driver-feature.patch
Dropped the below patches :
0001-NFC-fix-build-failure-100993.patch
6ee49080e4
revert-Zdual-proc-macros-additional-check.patch
Issue is fixed in rust-master and the fix is backported in the
subsequent patch of the series.
(From OE-Core rev: 4265f668de8c6708cb3a003ad655559031724149)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.83.0.
https://blog.rust-lang.org/2024/11/28/Rust-1.83.0.html
Renamed and modified the below patch to adapt the new version.
rv32-cargo-rustix-0.38.34-fix.patch->rv32-cargo-rustix-0.38.37-fix.patch
Modified the below patches to adapt the new version.
repro-issue-fix-with-cc-crate-hashmap.patch
revert-link-std-statically-in-rustc_driver-feature.patch
Dropped: zlib-off64_t.patch
a566e156b3kq
Because of the following commit ,
68034f837a
when we enable lib32, getting build failure because there is a check for target
support for "-Zdual-proc-macros" flag not functioning properly when lib32 is
enabled in the build environment. So for now reverting this commit and bring
back the previous behavior, where the "-Zdual-proc-macros" flag is always
added for building proc macros, regardless of the target architecture's support.
This would bypass the check introduced in the patch, allowing the build to
proceed without error, even when building for a 64-bit architecture with lib32 enabled.
(From OE-Core rev: 40d8dafdf556d7ce79c12a6de872193be9a0928a)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.82.0.
https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html
Renamed the below patch to adapt the new version.
rv32-cargo-rustix-0.38.28-fix.patch->rv32-cargo-rustix-0.38.34-fix.patch
Dropped: rv32-rustix-libc-backend.patch [addressed with rv32-cargo-rustix-0.38.34-fix.patch]
(From OE-Core rev: cfa431e734a642796140347f09c3c54b41a7bb75)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html
Drop the following backported patches which is addressed
with rust v1.81.0 upgrade.
0001-cargo-do-not-write-host-information-into-compilation.patch
2db0bab161
hardcodepaths.patch
28503d69ac
(From OE-Core rev: 611ec9ffbac974f472a828277ba7f3e344e99ca3)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update the patch files with rust v1.80.0.
The patch repro-issue-fix-with-cc-crate-hashmap.patch addresses the rust
reprouciblity issue by correcting the way hash values are generated for
different build paths.
https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html
(From OE-Core rev: d68449da0df795abe3233383a82d0b6b7908d736)
Signed-off-by: Sunil Dora <SunilKumar.Dora@windriver.com>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update the patch files with rust v1.79.0.
Drop the following backported patch which is merged
with rust v1.79 upgrade.
- cross-targets-backport.patch
https://blog.rust-lang.org/2024/06/13/Rust-1.79.0.html
(From OE-Core rev: 0e20d8e0a292f720c9ed419547d8f6d738c5d4d8)
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* 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>
* 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>
* 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>
Replace musl fixes with backports from upstream.
Add sysconfdir to config.toml to fix:
| thread 'main' panicked at install.rs:92:9:
| User doesn't have write access on `install.sysconfdir` path in `config.toml`.
https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html
(From OE-Core rev: 84f46dd2503bb0ef238fef0097c66fda88f6cbda)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Drop getrandom-open64.patch (merged upstream).
Revert c4f414f449
("Map source absolute paths to OUT_DIR as relative. (#684)") which
causes hashed versions of the build path to be used as part of the
filename of generated objects and hence reproducibility issues.
https://blog.rust-lang.org/2023/08/24/Rust-1.72.0.html
(From OE-Core rev: 30637cdeb31fae02544fdc643a455d0ebb126ee6)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
Drop 0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch as this
is merged upstream in rust-llvm.
https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html
(From OE-Core rev: d1af583c290eb0cff5e36363f7531832a863a1a8)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rebase patches, drop crossbeam_atomic is this fully merged upstream.
https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html
(From OE-Core rev: 39e05f9b0fdc3f76f8b80a12989f78614bc9ea5c)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rebase patches; one of the vendored crossbeam versions
has been removed upstream, and so crossbeam_atomic.patch
is adjusted accordingly.
Replace getrandom-open64.patch with a backport.
(From OE-Core rev: f5accb4fae49342cbec21718ae7a427615bfcedd)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Disable ZStd to avoid needing libzstd in llvm (mirrors zlib disable).
Generate complete list of rust-snapshot artefacts from src/stage0.json.
Drop clippy-driver reproducibility change as the code is gone from
upstream.
Release notes:
https://releases.rs/docs/1.67.0/
License-Update: Unicode-TOU text added (already in our license string)
(From OE-Core rev: 4900e0c5cb8a092a1d77d4f26249afa59b241da6)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
CARGO_VERSION isn't broken out in rust/src/stage0.json, there's only one
snapshot version, so just use that.
(From OE-Core rev: 9b0f88642570383b09de94238fe1a8ef5119fb47)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust follows the train release model via the stable, beta and nightly channels,
by default we build rust from the stable channel, however there are certain
features which are only available in the beta or nightly channels.
Make these channels available by setting a RUST_CHANNEL variable which defaults
to stable making this change transparent to the user.
The snapshot version used by rust during its compilation wont necessarily match
the version being built, specially if were building from an unstable channel,
to avoid confusion rename this to SNAPSHOT_VERSION and use RUST_VERSION for the
version to be built, which is automatically defined to PV.
Append -beta or -nightly to rusts PV for signature awareness.
It is important to note that this does not build rust from the beta/nightly
published tarball (which today build rust v1.67.0 and v1.68.0 respectively),
instead this builds rust from the current selected version (1.66.0) and enables
the beta/nightly features for that version.
Setting the variable RUST_CHANNEL=nightly results in the following:
$ rustc -Vv
rustc 1.66.0-nightly
(From OE-Core rev: 807a52686682d0d0a151ea3dadd99880feb67cc0)
Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Drop backported patch ENOTSUP constant for riscv32/musl.
Release notes:
https://blog.rust-lang.org/2022/12/15/Rust-1.66.0.html
License-Update: Upstream has added Unicode Terms of Use license
(Unicode-TOU).
(From OE-Core rev: e6a9e1ea7be842dcde109e952fbc7dc08d1577a2)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Release notes:
https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html
This is a standard upgrade aside from the path for the
stage2 tools binaries (clippy, et.al.) changing.
(From OE-Core rev: 9f390accf5fd174c430928cf841728d0456fc1b7)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Drop the two libstdc patches as they've finally appeared upstream.
Disable the use of libstdc++.a from the host distributions, as it results
in cross-distro contamination in rust-native.
(From OE-Core rev: 94760bc118952160865352c10ca7693680b5ce7e)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust has been upgraded to rust-1.60.0 that uses LLVM 14.
Please refer the following link for more detailed features.
https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.htmlhttps://github.com/rust-lang/rust/blob/master/RELEASES.md
(From OE-Core rev: 786a9a66486cf179ee4c9e295569fcd8c37fef78)
Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Drop libstd-rs patches as they're merged upstream.
(From OE-Core rev: 05f4a09899aa8dbb22ef1adb494abac41d5b96b7)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
RUST_BUILD_ARCH contains the arch_to_rust_arch()-translated value of
BUILD_ARCH. This is necessary to acquire the correct snapshot artifacts
under Linux where `uname -m` reports "ppc64le" rather than
"powerpc64le".
Change-Id: I6aec23aced8e1c6f0bfc46fe52531b0c16bcf687
(From OE-Core rev: c13afbade8d480807b9de70c56dcd650496f06b2)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This update includes fixes for the 'trojan source' vulnerability:
https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html
Drop two unused patches.
(From OE-Core rev: 5ff0b0d8c6c37ebf916062f03a378fe0e34b1c53)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is latest major release, changes are here [1]
Forward port libstd-rs patches and refresh musl/rv64 port
[1] https://github.com/rust-lang/rust/releases/tag/1.56.0
(From OE-Core rev: 183204cbc70a4ef418b16df48bc7eb6e3a75a114)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This complicates (semi) automated upgrades, and isn't necessary
as we carry only a single version of the toolchain.
(From OE-Core rev: f7a6b23d99fba5855cfb34788199877a14206293)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>