summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
AgeCommit message (Collapse)Author
4 daysrecipes: Update S = WORKDIR recipes to use ${S} correctlyRichard Purdie
Where recipes use S = ${WORKDIR}, ensure they are referencing ${S} correctly to access files as soon we want to stop doing this in WORKDIR at which point they would break unless corrected. (From OE-Core rev: f25dd633fffe6560f191526d1869e657e129bad9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-10rust: set CVE_STATUS for CVE-2024-24576Harish Sadineni
CVE-2024-24576 only applies when invoking batch files (with the `bat` and `cmd` extensions) on Windows & No other platform or use is affected. More details about CVE is here: https://nvd.nist.gov/vuln/detail/CVE-2024-24576 (From OE-Core rev: 28eddfa53494c7560861feff84be3f3a5a46aecb) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-18cargo-c-native: update 0.9.18 -> 0.9.30Alexander Kanavin
(From OE-Core rev: 772cb94c9ab0645714e182f0141dc6c8b26b05ef) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-18cargo-c-native: convert from git fetcher to crate fetcherAlexander Kanavin
Fetching from git requires manually maintaining Cargo.lock which is tedious and unclear how to do correctly, especially with version updates. On the other hand, crates do include Cargo.lock, and this way the revisions would match upstream's and crate users (which requires regenerating crates.inc to match the lock file). (From OE-Core rev: 03c1954404bf56470935b12cb3aeb02199f68ded) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-18rust: reproducibility issue fix with v1.75Sundeep KOKKONDA
Patch updated with upstream fix. https://github.com/rust-lang/rust/pull/121959/commits/a9a979839bbdfec48c75d618ab0dce8a953589b8 (From OE-Core rev: 2eceaa4b6ca398ec233b18c1064970bdf68a9258) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-05rust: Fix build failure re-appeared on riscv32Khem Raj
Refresh the rustix-0.38.19 patch to include FICLONE definition which fixes the build issue surfaced with rust 1.75 (From OE-Core rev: 693e7cb3eb0cdc715a45ddcba8eb09dc9c5c31b8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01rust: reproducibility issue fix with v1.75Yash Shinde
With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibiluty issues. This change will fix the path name format back to '/rust/$hash' as in earlier versions. Below are the links for detailed bug description & discusssion with upstream rust. https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219 https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656 (From OE-Core rev: a80ce6e3c023809d1ec13d19e8acb25770b54737) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01rust: Revert PGO to it's defaultYash Shinde
The rust profiler PGO (Profile-guided Optimization) options was disabled as a part rustdoc reproducibility fix. https://git.yoctoproject.org/poky/commit/meta/recipes-devtools/rust?id=321aebfa281bd28e368c684ece57867f6bd0cbe7 But, other applications (such as to build chromium with poky) requires PGO enabled (https://github.com/OSSystems/meta-browser/issues/786). For reproducibility issue fix only "rust-demangler" change is sufficient in commit#321aebfa281. The PGO is reverted to it's default. (From OE-Core rev: 83bd5e12e069a60a870a7c7ed046a2827eb777a1) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01rust: Upgrade 1.74.1 -> 1.75.0Yash Shinde
* 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>
2024-02-08rust/cargo: Build fixes to rust for rv32 targetKhem Raj
(From OE-Core rev: 0b1666b921b99732798b62b900436ab79876a6a2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26rust: Re-write RPATHs in the copies llvm-configKhem Raj
Ensure that it can still access the native-sysroot for dependencies, use ORIGIN to indicate this relative its install location, this also helps in this not getting into the output of llvm-config which could otherwise provide incorrect library paths target rust recipe builds ( cross compile ) calls llvm-config from target sysroot which works ok as long as C++ runtime it needs is available on build host e.g. libstdc++ etc. which is commonly the case, however when using clang and llvm runtime this falters since it should be using libc++ from native sysroot and if this does not exist on build machine this fails to find libc++ shared object and llvm-config fails to run. This ensures that llvm-config version in use is correctly relocated and can use shared libraries from native sysroot correctly. Adding ORIGIN to sysroot will look for the .so in same dir as the binary and there is the libc++.so.1 copied in place Fixes rust build with clang compiler. | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/rust/1.74.1/recipe-sysroot/usr/lib/llvm-rust/bin/llvm-config: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or director y | thread 'main' panicked at llvm.rs:551:19: | command did not execute successfully: "/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/rust/1.74.1/recipe-sysroot/usr/lib/llvm-rust/bin/llvm-config" "--version" | expected success, got: exit status: 127 (From OE-Core rev: 178ad50bf36f244f96159bb2f94e0d8849487931) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26rust: Enable rust oe-selftest.Yash Shinde
* Enable rust oe-selftest. * Include the dependent patches for rust oe-selftest in meta/recipes-devtools/rust/rust-source.inc * Disable rust oe-selftest for mips32 target (Rust upstream has classified it into tier 3 target, for which the Rust project does not build or test automatically) as it is unstable with rust tests. https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 * The testing is done on arm32, arm64, mips64, x86 and x86_64 targets on Ubuntu 22.04. (From OE-Core rev: 8f3a2841540fc4779bbd7e11d910edcdc8b47683) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26rust: Fix assertion failure error on oe-selftestYash Shinde
Fixes: thread 'main' panicked at 'assertion failed: `(left == right)` left: `x86_64-unknown-linux-gnu`, right: `x86_64-poky-linux-gnu`: Cannot obtain compiler for non-native build triple at stage 0', compile.rs:1474:13 Add correct target value for cross-compiled targets on stage1 during rust oe-selfest. (From OE-Core rev: b8c1091276b6b9b1ae162dd19b2652f493a686d8) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest.Yash Shinde
Fixes: error: the option `Z` is only accepted on the nightly compiler When rust.channel is set to either beta or stable, we can't use nightly features on bootstrap without RUSTC_BOOTSTRAP. Set RUSTC_BOOTSTRAP=1 to use nightly features on stable or beta. (From OE-Core rev: 01a411223fb85fedf85472402f63f6cb2f32ed6b) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26rust: detect user-specified custom targets in compiletestYash Shinde
Fixes: thread 'main' panicked at 'failed to gather the target spec for '<arch>-unknown-linux-gnu', synthetic_targets.rs:66:9 Detect and fetch custom target configurations when rustc is bootstrapped in rust oe-selftest. (From OE-Core rev: fdd9385d9845d628e10179598fc42d29519c5dfd) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26rust: Fetch cargo from rust-snapshot dir.Yash Shinde
Fixes: Exception: no cargo executable found at `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo` Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir. Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125 (From OE-Core rev: 1a048b5ab7f891911beaa14eb9269033c84088dc) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30rust: Upgrade 1.74.0 -> 1.74.1Alex Kiernan
https://blog.rust-lang.org/2023/12/07/Rust-1.74.1.html (From OE-Core rev: b98373075c6cc416bd0375b98b6bbdddf599d9a1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30rust: Upgrade 1.73.0 -> 1.74.0Alex Kiernan
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>
2023-12-30rust: Upgrade 1.72.1 -> 1.73.0Alex Kiernan
https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html (From OE-Core rev: 728c40b939c6af6358a483237298ca834cbb8993) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30rust: Upgrade 1.72.0 -> 1.72.1Alex Kiernan
https://blog.rust-lang.org/2023/09/19/Rust-1.72.1.html (From OE-Core rev: d1386bbf2211c7616527e62f2f7b069a935b0d68) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30rust: Upgrade 1.71.1 -> 1.72.0Alex Kiernan
Drop getrandom-open64.patch (merged upstream). Revert https://github.com/rust-lang/cc-rs/commit/c4f414f449bb7cffba3bc923f277704d1d08a8ec ("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>
2023-12-21rust: rustdoc reproducibility issue fix - disable PGOSundeep KOKKONDA
The PGO (Profile-guided Optimization) collect data about the typical execution of a program and then use this data to inform optimizations such as inlining, machine-code layout, register allocation, etc. This optimization is by default disabled in rust sources but enabled in Yocto and causing the reproducibility issue in rustdoc binary. To fix the issue this optimization is set to it's default 'false'. More about the optimization: https://doc.rust-lang.org/rustc/profile-guided-optimization.html With the reproducibility issue fixed, we can enable the reproducibility tests again. (From OE-Core rev: 189c266378c8c4a918cb205b3888577c7ce76856) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13rust: Upgrade 1.71.0 -> 1.71.1Alex Kiernan
https://blog.rust-lang.org/2023/08/03/Rust-1.71.1.html (From OE-Core rev: ad4369d7901c1239e5f07473b1f2517edc4a23ea) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13rust: Upgrade 1.70.0 -> 1.71.0Alex Kiernan
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>
2023-12-04rust: Drop targets and hosts override magicAlex Kiernan
`targets` and `hosts` could be overridden prior to 0a01b5ab973e ("rust-cross-canadian: Simplify and fix"), that commit deleted this usage, remove the remnant of it from here. (From OE-Core rev: 6c93a71a9855cb0231d2f90f0412b6a49e3b1d99) 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>
2023-12-04rust-llvm: Allow overriding LLVM target archsNiko Mauno
Move the default value into a variable which can be overridden to match more accurately the use case specific scenario. (From OE-Core rev: 645370e85d8742d0614cd52ca7507b5df2d38ad8) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-01rust: Drop TARGET_VENDOR exportAlex Kiernan
This was used by crossbeam_atomic.patch, but that patch was removed as part of the 1.69.0 upgrade. (From OE-Core rev: 3753997d6ec19e8cd082f9a602ebe4a7c1308c36) 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>
2023-12-01rust: Delete python2 configparser code pathAlex Kiernan
We no longer support python2, remove the python2 fallback code. (From OE-Core rev: c7c17dcaf452abbf49fd05c15cd56aa4b4382284) 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>
2023-11-27rust: Split rustdoc into a separate packageSundeep KOKKONDA
The 'rustdoc' is moved to a separate 'rust-rustdoc' package. This is a workaround to test if the main rust binary is reproducible even if rustdoc isn't. (From OE-Core rev: dfed7e63e199009ecca8e2e34f6a823c6e1677e0) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-23rust-llvm: remove python3native dependencyRoss Burton
LLVM doesn't actually need a native Python3 as the host Python is sufficient, but as it then looks at the host for optional Python dependencies explicitly disable their detection so that rust-llvm remains deterministic. As this is a minimal LLVM for Rust, we don't need the optviewer tool. (From OE-Core rev: c6971d9d9a9d9a83615508d244778ddc89a94b8a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-20rust: drop PE, PR from /usr/src/debug pathsMartin Jansa
(From OE-Core rev: e4931b1d6f147fc7ced080e30c63f0aaf0d1e7ff) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-05rust-cross-canadian: Add riscv64 to cross-canadian hostsKhem Raj
(From OE-Core rev: c0bf5dd2f3ef11df35130283853017ba69d0e9c1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-19rust-cross-canadian: set CARGO_TARGET_<triple>_RUNNER for nativesdkSean Nyekjaer
This will enable us to build and run rust programs on the sdk host. % cargo run --target x86_64-oesdk-linux-gnu -vv Fresh hello v0.1.0 (~/development/hello) Finished dev [unoptimized + debuginfo] target(s) in 0.02s Running `/usr/local/sdk/sysroots/x86_64-oesdk-linux/lib/ld-linux-x86-64.so.2 target/x86_64-oesdk-linux-gnu/debug/hello` Hello, world (From OE-Core rev: 0dc848e0b560947f93a780f4bf7b6d1926a570eb) Signed-off-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-19rust-cross-canadian: set CARGO_TARGET_<triple>_RUSTFLAGSSean Nyekjaer
Avoid setting sdk-wide RUSTFLAGS as these flags only are valid when building for target. This will enable building for different targets with different RUSTFLAGS. (From OE-Core rev: 25627606aadacae3a2ab805a6098c81fed154b27) Signed-off-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-11rust: reproducibility issue fixSundeep KOKKONDA
The '--remap-path-prefix' option removes all references to build directory structure in the debug information within the compiled output for Cargo dependencies and the project's binary. However, some references to build directories remains in the final binary in .rustc section in the form of compressed metadata and this makes the build output dependent on the folder structure of the computer it's compiled on. So, for reproducible builds, use the configuration option 'remap-debuginfo = true' along with the '--remap-path-prefix'. [YOCTO# 14875] (From OE-Core rev: 6ae62259afbbe861ed74211dab18a27b8c8d8b7a) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22recipes: Drop remaining PR values from recipesRichard Purdie
We've been removing PR values from recipes at upgrade time for a while. In general anyone maintaining a binary distro would end up having to curate these themselves so the values in OE-Core aren't really that useful anymore. In many ways it makes sense to clear out the remaining ones (which are mostly for 'config' recipes that are unlikely to increase in PV) and leave a clean slate for anyone implementing a binary distro config. References are left in meta-selftest since the tests there do involve them and their removal upon upgrade. (From OE-Core rev: d4c346e8ab8f3cae25d1b01c7331ed9f6d4f96ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-12cargo-c-native: fix version checkAlexander Kanavin
(From OE-Core rev: 6176f8c95e444766fd3e8b89f0be686a03800268) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21rust: add cargo-c native recipeFrederic Martinsons
This package make it easier to generate C/C++ ABI compatible header, library and also generate package config file. It is built around cbindgen (https://github.com/mozilla/cbindgen) for the header generation, it compiles the library (static or dynamic) through cargo and finally handle the generation of a custom package config file. (From OE-Core rev: dfce5f9ffb5240aadae311c2a2e912a315afc703) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30oeqa/selftest/rust: Add failed test cases to exclude list for Rust Oe-selftestYash Shinde
* Add the failing test cases in exclude_list to exclude them from testing during the Rust Oe-selftest. * Drop meta/recipes-devtools/rust/files/rust-oe-selftest.patch file as the failing tests are moved from being a patch to exclude_list in meta/lib/oeqa/selftest/cases/rust.py. * When updating to a newer version of Rust, it is manually needed to update the exclude_list. The tests that fail are observed to work on some versions and fail on others. These tests have been excluded in order to successfully complete testing of Rust Oe-selftest. * The tests that are passed and skipped are as follows- Target PASS SKIPPED ARM 15507 428 ARM64 15535 400 MIPS64 15479 456 X86 15528 407 X86-64 15643 292 Also, time the test execution and pass the time taken for inclusion in the test report. [RP: Note duration addiion in the commit log] (From OE-Core rev: e81197c4d3b36e9ad52e56708c21987cacd13147) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30rust: Fix BOOTSTRAP_CARGO failure during Rust Oe-selftestYash Shinde
BOOTSTRAP_CARGO command fails due to codegen flags like `-Cpanic` were prevented from being reflected in the current target configuration which leads to Rust build(rust version 1.70) failure in Oe-selftest. Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/9dffb52738e0b2ccd15af36d4607a709b21e020c] (From OE-Core rev: a48e3612b5dc0e58a89f88a914365e926101c90b) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-19oeqa/selftest: Add rust selftestsYash Shinde
The patch implements Rust testing framework similar to other selftest, specifically the gcc selftest in OE. It uses the client and server based method to test the binaries for cross-target on the image. The test framework is a wrapper around the Rust build system as ./x.py test. It tests many functionalities of Rust distribution like tools, documentation, libraries, packages, tools, Cargo, Crater etc. Please refer the following link for detailed description of Rust testing:- https://rustc-dev-guide.rust-lang.org/tests/intro.html#tool-tests To support the rust tests in oe-core, the following functions were added:- setup_cargo_environment(): Build bootstrap and some early stage tools. do_rust_setup_snapshot(): Install the snapshot version of rust binaries. do_configure(): To generate config.toml do_compile(): To build "remote-test-server" for qemu target image. Approximate Number of Tests Run in the Rust Testsuite :- 18000 Approximate Number of Tests that FAIL in bitbake environment :- 100-150 Normally majority of the testcases are present in major folder "test/" It contributes to more than 80% of the testcases present in Rust test framework. These tests pass as expected on any Rust versions without much fuss. The tests that fail are of less important and contribute to less than 2% of the total testcases. These minor tests are observed to work on some versions and fail on others. They have to be added, ignored or excluded for different versions as per the behavior. These tests have been ignored or excluded in the Rust selftest environment to generate success of completing the testsuite. These tests work in parallel mode even in the skipped test mode as expected. Although the patch to disable tests is large, it is very simple in that it only disables tests. When updating to a newer version of Rust, the patch can usually be ported in a day. Tested for X86, X86-64, ARM, ARM64 and MIPS64 on Ubuntu 22.04. (From OE-Core rev: 7c3346d8fbe85302b605bb3f772b029ea7bfaa6c) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com> Signed-off-by: Yash Shinde <yashinde145@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-27rust-common.bbclass: move musl-specific linking fix from rust-source.incAlexander Kanavin
This needs to be done for any item that is linked under rustc, and not just rust itself. Latest python-cryptography exposes the issue. (From OE-Core rev: d3811228747590ea06e8d68be4785d45ec9c478f) 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>
2023-06-15libstd-rs, rust: use bfd linker instead of goldMartin Jansa
* it started to fail only after the upgrade to 1.70.0 (From OE-Core rev: aa037b4138459521a3554c5e91cb4a6cd0c37bdd) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-07rust: Upgrade 1.69.0 -> 1.70.0Alex Kiernan
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>
2023-05-05rust: Upgrade 1.68.2 -> 1.69.0Alex Kiernan
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>
2023-05-02gcc/go: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie
handling There is little point in having "crosssdk" suffex added to the virtual provider within gcc/go since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. This also allows removal of some of the MLPREFIX usage since again, the triplet also covers this. (From OE-Core rev: fe0206ba482d209b24e636d578aa68ba5e67ba1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-13meta/recipes: ensure all recipes have a SUMMARYAlexander Kanavin
DESCRIPTION is optional for now; writing good component descriptions is not easy (but appreciated). (From OE-Core rev: 9ce4f9248db3db70732d886a18ea355f321bd49d) 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>
2023-04-13rust: Upgrade 1.68.1 -> 1.68.2Alex Kiernan
Changes: * Update the GitHub RSA host key bundled within Cargo. The key was rotated by GitHub on 2023-03-24 after the old one leaked. * Mark the old GitHub RSA host key as revoked. This will prevent Cargo from accepting the leaked key even when trusted by the system. * Add support for @revoked and a better error message for @cert-authority in Cargo’s SSH host key verification (From OE-Core rev: 4563432b41026adc56c54452984b19ab64e7406e) 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>
2023-04-13cargo: Fix build on musl/riscvKhem Raj
libc needs fix for defining scope of SOCK_SEQPACKET (From OE-Core rev: 378da16ebe2917f26f9fe8cf654bced09ec6ecfe) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-04rust: update 1.67.1 -> 1.68.1Alexander Kanavin
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>