summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
Commit message (Collapse)AuthorAgeFilesLines
...
* cargo-c: convert to target recipeAlexander Kanavin2024-12-121-1/+2
| | | | | | | | | | | | | | | This was prompted by sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs where adwaita-icon-theme would fail due to new librsvg introducing cargo-c-native into dependency path. Rather than look into why is that, I simply converted the recipe into the standard 'target + BBCLASSEXTEND' approach. (From OE-Core rev: 80a2673a3081e623f30f25cc773ac9217e717958) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-c-native: update 0.10.3 -> 0.10.5Alexander Kanavin2024-12-052-237/+243
| | | | | | | | (From OE-Core rev: 942b6ab25f0c1df02920997b63db89187fbdeea1) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.80.0->1.80.1Deepthi Hemraj2024-11-216-1/+1
| | | | | | | | | | | | | | | | | | https://blog.rust-lang.org/2024/08/08/Rust-1.80.1.html Testing Summary for rust_1.80.1 Target pass skipped x86_64 18254 434 x86 18084 604 ARM64 18111 577 ARM 18067 621 ppc 18035 653 (From OE-Core rev: 41da52480931c5ff90884c9d658075b8885abe8c) Signed-off-by: Sunil Dora <SunilKumar.Dora@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.79.0->1.80.0Harish Sadineni2024-11-188-194/+85
| | | | | | | | | | | | | | | | | 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>
* rust: Add patch to increase timeout in process-sigpipe rust selftestPeter Tatrai2024-11-122-0/+32
| | | | | | | | | | | | | | | | | This commit adds a patch to increase the timeout in the process-sigpipe rust selftest to prevent occasional failures under heavy server load. The patch aims to reduce the likelihood of false negatives when the test environment is overloaded. Patch file: * oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch Fixes [YOCTO #15625] (From OE-Core rev: 12c85933e2150ba78a8a914787e400c95c5cf585) Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: set CVE_STATUS for CVE-2024-43402Ranjitsinh Rathod2024-10-151-0/+1
| | | | | | | | | | As per NVD, this CVE only affects to Windows platform Link: https://nvd.nist.gov/vuln/detail/CVE-2024-43402 (From OE-Core rev: dcb3016f9c0e8e72642cccf335da65345a2f0c92) Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.78.0->1.79.0Yash Shinde2024-08-2911-111/+131
| | | | | | | | | | | | | | | | 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>
* rust: Oe-selftest changes for rust v1.79Yash Shinde2024-08-291-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | * Sort the exclude list in alphabetical order. * Add some of the upsupported/failing tests to the exclude list and ignore the failing unit tests. * Remove duplicated tests from the exclude list. * Testing summary Target PASS SKIPPED ARM 17241 599 ARM64 17279 561 MIPS64 17228 612 PPC 17194 629 X86 17257 583 X86-64 17416 424 (From OE-Core rev: 61ec0f0f78d9db4c3fc02365713d5fd77b78a7ea) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-c-native: update 0.9.30 -> 0.10.3Alexander Kanavin2024-08-282-389/+411
| | | | | | | (From OE-Core rev: 566b2fc345794773f3b4355077c5c981cdc697ca) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.77.2->1.78.0Yash Shinde2024-08-2016-295/+202
| | | | | | | | | | | | | | | | * 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>
* rust: Oe-selftest changes for rust v1.78Yash Shinde2024-08-201-2/+62
| | | | | | | | | | Add some of the upsupported/failing tests to the exclude list and ignore the failing unit tests. (From OE-Core rev: 81bbd6db47f45628ff4be400e1f2fa5b09ccd0bb) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.77.1->1.77.2Yash Shinde2024-08-096-1/+1
| | | | | | | | | https://blog.rust-lang.org/2024/04/09/Rust-1.77.2.html (From OE-Core rev: c3a996c3b06b11a5e2b07dbf820f3e3eb1e28782) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.77.0->1.77.1Yash Shinde2024-08-096-1/+1
| | | | | | | | | https://blog.rust-lang.org/2024/03/28/Rust-1.77.1.html (From OE-Core rev: a7ca97ffbb23602ad79c3dc1819cfedd0b969075) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.76.0->1.77.0Yash Shinde2024-08-0911-117/+67
| | | | | | | | | | | | * Drop backported patch 0001-Handle-vendored-sources-when-remapping-paths.patch as it's merged with rust v1.77.0. https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html (From OE-Core rev: 8b6b224fc116150c0af658473eecd05b742de7b1) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Oe-selftest changes for rust v1.77Yash Shinde2024-08-093-3/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the file paths for v1.77 and fix the dead code error as follows: Compiling coverage-dump v0.1.0 (/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.77.0/rustc-1.77.0-src/src/tools/coverage-dump) error: field `0` is never read --> src/tools/coverage-dump/src/covfun.rs:222:15 | 222 | Expansion(u32), | --------- ^^^ | | | field in this variant | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 222 | Expansion(()), | ~~ error: could not compile `coverage-dump` (bin "coverage-dump") due to 1 previous error Only the required change is backported here to run the build without any errors. Other changes are merged with the commit in v1.78. Reference: https://github.com/rust-lang/rust/commit/9a5034a20ed8b055dc615271f9d9cf27f9e494f0#diff-d4ecc6273352a2a8ebd02c45233d9bff7c6694f20b67ddad0614af7a89c06748 (From OE-Core rev: 072df9d3d8792a6f0250cc5e37545f04e6a046ec) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: reproducibility issue fix with v1.76Yash Shinde2024-08-092-0/+60
| | | | | | | | | | | | A few crates are using the updated version of the 'cc' crate and this is causing the generated object file names containing a unique hashmap id. The hashmap addition to generated files is reverted here. (From OE-Core rev: 25fed23ea9dcd1e7f0c11a1e3a988a33d5676c0b) 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>
* rust: Upgrade 1.75.0->1.76.0Yash Shinde2024-08-0914-1701/+57
| | | | | | | | | | | | | | | | | | | | | | | * 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>
* rust: Oe-selftest fixes for rust v1.76Yash Shinde2024-08-093-0/+354
| | | | | | | | | | Add the failing tests in rust v1.76 to the exclude list and add "ignore" tags to ignore failing unit test cases. (From OE-Core rev: 75399802515ac423503e637281a4585dd00d7c75) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: rustdoc reproducibility issue fixSundeep KOKKONDA2024-07-303-0/+28
| | | | | | | | | | | | | | The 'codegen-units' option split the crate into multiple compilation units for parallel compilation. Currently, this split is causing the rustdoc to generate differnt binary between the builds. To fix this the codegen-units & the lto options are disabled. More info about options: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units https://doc.rust-lang.org/rustc/codegen-options/index.html#lto (From OE-Core rev: 0c00875de10b171f4ff2990af351a8124ec7e972) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs,rust-cross-canadian: set CVE_PRODUCT to rustPeter Marko2024-07-162-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These recipes come from rust sources and CVEs are reported for them under rust-lang:rust vendor:product touple. Especially libstd-rs needs correct CVE_PRODUCT as is it installed on target devices (being statically linked to rust compiled binaries). before: cargo: CVE_PRODUCT="cargo" cargo-c-native: CVE_PRODUCT="cargo-c" libstd-rs: CVE_PRODUCT="libstd-rs" rust: CVE_PRODUCT="rust" rust-cross-canadian: CVE_PRODUCT="rust-cross-canadian-<arch>" rust-llvm: CVE_PRODUCT="rust-llvm" after: cargo: CVE_PRODUCT="cargo" cargo-c-native: CVE_PRODUCT="cargo-c" libstd-rs: CVE_PRODUCT="rust" rust: CVE_PRODUCT="rust" rust-cross-canadian-x86-64: CVE_PRODUCT="rust" rust-llvm: CVE_PRODUCT="rust-llvm" Product for rust-llvm is uncertain and, should be handled in another commit if it is desired to align it, too. sqlite> select vendor, product, count(product) from products where vendor="rust-lang" group by product; rust-lang|async-h1|2 rust-lang|cargo|5 rust-lang|future-utils|2 rust-lang|futures-task|2 rust-lang|mdbook|1 rust-lang|regex|2 rust-lang|rsa|2 rust-lang|rust|45 rust-lang|socket2|1 (From OE-Core rev: e8cf1df16a6ec2785cacaf608bec5cd8496103af) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Stop overriding unprefixed *FLAGS variablesRichard Purdie2024-07-012-2/+2
| | | | | | | | | | | | | | | | | | | | We're currently encouraging an "arms race" with the FLAGS variables since a recipe might want to set a specific flag for all variants but to do so, += won't work due to the assignment in the native/nativesdk class files. This means recipes are using append. Since the default variables are constructed out of TARGET_XXX variables and we redefine these, there is no need to re-define the un-prefixed variables. If we drop that, the += appends and similar work and recipes don't have to resort to append. Change the classes and cleanup a number of recipes to adapt to the change. This change will result in some flags appearing to some native/nativesdk variants but that is probably what was originally expected anyway. (From OE-Core rev: a157b2f9d93428ca21265cc860a3b58b3698b3aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: build the default set of toolsAlexander Kanavin2024-05-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | Setting it explicitly replaces rust's default choice which is rustdoc (needed for example in selftests and otherwise expected to be present in typical rust installations): https://github.com/rust-lang/rust/blob/master/config.example.toml#L320 This addresses some of the rust selftest failures but not all. Help is appreciate to restore the selftest. Unfortunately, this also breaks rust reproducibility (or rather exposes that it was never properly fixed, as explained here: https://lists.openembedded.org/g/openembedded-core/message/199288 ) (From OE-Core rev: 58eaf2ee6c0809bf0a0d3c1d177e62bda7241651) 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: use rust-snapshot binaries only in rust-nativeAlexander Kanavin2024-05-281-2/+12
| | | | | | | | | | | | | | | | | | | | Otherwise, use rust-native and cargo-native binaries as that allows our native tweaks in them to be used for target/nativesdk rust - same as for everything else written in rust. In particular, this allows building target rust with cargo-native that includes important reproducibility tweaks. Unfortunately, this also breaks rust selftest, and that is partially addressed by the following commit. [YOCTO #15185] (From OE-Core rev: 8f2230cb51fe22ef4711a56fecfab4858c04e35b) 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: add reproducibility patch to eliminate host leakageAlexander Kanavin2024-05-282-0/+52
| | | | | | | | | | [YOCTO #15185] (From OE-Core rev: 924df18b47e9a69fa295bafe37bdb39d8eaea2bb) 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: correctly link rust-snapshot into build/stage0Alexander Kanavin2024-05-223-42/+2
| | | | | | | | | | | | | | | | | | This does not seem to be used in regular builds, but is beneficial in rust selftest, where it allows dropping a custom patch that is unsuitable for upstream (and was rejected by them). Also remove an obsolete comment that seems related to the code but describes something that was resolved long time ago. I have confirmed that the rust selftest continues to pass with just this one commit on top of master (as the following changes do break the selftest). (From OE-Core rev: bf5732e2b235ce06fa1f24fe8f0dbcbc068500e3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Switch away from S = WORKDIRRichard Purdie2024-05-211-1/+2
| | | | | | | | | | | | | Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to a subdir of WORKDIR and make S point at this instead. I've chosen not to force S into any standard UNPACKDIR we may pick in future just so the S = UNPACKDIR case is clearly visible by the directory naming under WORKDIR as that should aid usability. (From OE-Core rev: d9328e3b0b062f0621de3d114584b44f384a1c02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Start WORKDIR -> UNPACKDIR transitionRichard Purdie2024-05-212-2/+2
| | | | | | | | | Replace references of WORKDIR with UNPACKDIR where it makes sense to do so in preparation for changing the default value of UNPACKDIR. (From OE-Core rev: 1f18b9a512800860d5153d89eb82b56388efad6f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Update S = WORKDIR recipes to use ${S} correctlyRichard Purdie2024-05-021-1/+1
| | | | | | | | | | 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>
* rust: set CVE_STATUS for CVE-2024-24576Harish Sadineni2024-04-101-0/+2
| | | | | | | | | | 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>
* cargo-c-native: update 0.9.18 -> 0.9.30Alexander Kanavin2024-03-182-337/+531
| | | | | | | (From OE-Core rev: 772cb94c9ab0645714e182f0141dc6c8b26b05ef) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-c-native: convert from git fetcher to crate fetcherAlexander Kanavin2024-03-183-2387/+208
| | | | | | | | | | | | | | 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>
* rust: reproducibility issue fix with v1.75Sundeep KOKKONDA2024-03-181-12/+25
| | | | | | | | | | 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>
* rust: Fix build failure re-appeared on riscv32Khem Raj2024-03-051-5/+25
| | | | | | | | | | 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>
* rust: reproducibility issue fix with v1.75Yash Shinde2024-03-012-0/+24
| | | | | | | | | | | | | | | 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>
* rust: Revert PGO to it's defaultYash Shinde2024-03-011-4/+0
| | | | | | | | | | | | | | 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>
* rust: Upgrade 1.74.1 -> 1.75.0Yash Shinde2024-03-0121-802/+141
| | | | | | | | | | | | | | | | | | | | | * 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>
* rust/cargo: Build fixes to rust for rv32 targetKhem Raj2024-02-084-0/+1611
| | | | | | | (From OE-Core rev: 0b1666b921b99732798b62b900436ab79876a6a2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Re-write RPATHs in the copies llvm-configKhem Raj2024-01-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rust: Enable rust oe-selftest.Yash Shinde2024-01-261-0/+4
| | | | | | | | | | | | | | | | | | * 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>
* rust: Fix assertion failure error on oe-selftestYash Shinde2024-01-261-0/+26
| | | | | | | | | | | | | 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>
* rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest.Yash Shinde2024-01-261-0/+21
| | | | | | | | | | | | | 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>
* rust: detect user-specified custom targets in compiletestYash Shinde2024-01-261-0/+90
| | | | | | | | | | | | | 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>
* rust: Fetch cargo from rust-snapshot dir.Yash Shinde2024-01-261-0/+37
| | | | | | | | | | | | | | 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>
* rust: Upgrade 1.74.0 -> 1.74.1Alex Kiernan2023-12-306-1/+1
| | | | | | | | | 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>
* rust: Upgrade 1.73.0 -> 1.74.0Alex Kiernan2023-12-3016-325/+724
| | | | | | | | | | | | | | | | 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>
* rust: Upgrade 1.72.1 -> 1.73.0Alex Kiernan2023-12-309-60/+54
| | | | | | | | | 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>
* rust: Upgrade 1.72.0 -> 1.72.1Alex Kiernan2023-12-306-1/+1
| | | | | | | | | 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>
* rust: Upgrade 1.71.1 -> 1.72.0Alex Kiernan2023-12-3012-144/+172
| | | | | | | | | | | | | | | | 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>
* rust: rustdoc reproducibility issue fix - disable PGOSundeep KOKKONDA2023-12-211-1/+2
| | | | | | | | | | | | | | | | | | | 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>
* rust: Upgrade 1.71.0 -> 1.71.1Alex Kiernan2023-12-136-1/+1
| | | | | | | | | 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>