summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
Commit message (Collapse)AuthorAgeFilesLines
* rust: Fix CVE-2023-40030Deepthi Hemraj2024-01-042-0/+413
| | | | | | | | | | | | | | | CVE:CVE-2023-40030 This converts the feature name validation check from a warning to an error Upstream-Status: Backport from https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33 Reference: https://nvd.nist.gov/vuln/detail/CVE-2023-40030 (From OE-Core rev: c55e8f8b1971cc9f311b6a18a34c4c34f732177a) Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rust: reproducibility issue fixSundeep KOKKONDA2023-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* recipes: Drop remaining PR values from recipesRichard Purdie2023-09-221-1/+0
| | | | | | | | | | | | | | | | 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>
* cargo-c-native: fix version checkAlexander Kanavin2023-09-121-0/+1
| | | | | | | (From OE-Core rev: 6176f8c95e444766fd3e8b89f0be686a03800268) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: add cargo-c native recipeFrederic Martinsons2023-08-213-0/+2656
| | | | | | | | | | | | | | | 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>
* oeqa/selftest/rust: Add failed test cases to exclude list for Rust Oe-selftestYash Shinde2023-07-302-2325/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* rust: Fix BOOTSTRAP_CARGO failure during Rust Oe-selftestYash Shinde2023-07-302-0/+128
| | | | | | | | | | | | | 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>
* oeqa/selftest: Add rust selftestsYash Shinde2023-07-193-0/+2331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rust-common.bbclass: move musl-specific linking fix from rust-source.incAlexander Kanavin2023-06-271-5/+0
| | | | | | | | | | | 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>
* libstd-rs, rust: use bfd linker instead of goldMartin Jansa2023-06-152-0/+10
| | | | | | | | | | * 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>
* rust: Upgrade 1.69.0 -> 1.70.0Alex Kiernan2023-06-0710-161/+81
| | | | | | | | | | | | | 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>
* rust: Upgrade 1.68.2 -> 1.69.0Alex Kiernan2023-05-0511-138/+98
| | | | | | | | | | | | 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>
* gcc/go: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-1/+1
| | | | | | | | | | | | | | | 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>
* meta/recipes: ensure all recipes have a SUMMARYAlexander Kanavin2023-04-132-1/+2
| | | | | | | | | | | 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>
* rust: Upgrade 1.68.1 -> 1.68.2Alex Kiernan2023-04-136-1/+1
| | | | | | | | | | | | | | | | | 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>
* cargo: Fix build on musl/riscvKhem Raj2023-04-132-0/+99
| | | | | | | | | | 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>
* rust: update 1.67.1 -> 1.68.1Alexander Kanavin2023-04-049-78/+64
| | | | | | | | | | | | | 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>
* rust: install llvm item only onceAlexander Kanavin2023-04-041-1/+1
| | | | | | | | | | Otherwise it triggers a rebuild of llvm-dependent rust pieces every time rust_runx is called, lengthening the builds without need. (From OE-Core rev: aca6b29b508175da9f213b1c6dba5d02a15b8287) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: do not run separate build/install stepsAlexander Kanavin2023-04-041-11/+4
| | | | | | | | | | | | | | Upstream does not actually use or test it this way; if the goal is to install items, then install target should be executed directly. In particular, in latest rust release building stage 2 items has regressed altogether (incorrect dependencies between rust-analyze tool and the libs it needs) and no one noticed. (From OE-Core rev: 7d805f9a9f6b5048308a37a2757d08cca40b1ff3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* llvm: remove redundant CMake variablesRoss Burton2023-03-311-2/+0
| | | | | | | | | | This recipe uses the cmake class, so there's no need to set the Ninja backend, or tell it where Python is, or that we're cross-compiling. (From OE-Core rev: 2560665cc1e30a6ca969118ade8612393e1eef74) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: added missing runtime dependencies to run rust on targetSundeep KOKKONDA2023-03-111-0/+2
| | | | | | | | | | | | | | [YOCTO #14975] rust files are not linking on target due to missing dependencies and observed below error. error: linker `x86_64-poky-linux-gcc` not found Added the required dependencies to run rust on target machine. (From OE-Core rev: bb781f452299cfa6ec7fffd215b0af3149178f32) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.67.0 -> 1.67.1Alexander Kanavin2023-02-206-1/+1
| | | | | | | | (From OE-Core rev: d80c1e0270cdb35a29863eefaa5a8be2a2841631) 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 `update_snapshot` task to generate `rust-snapshot.inc`Alex Kiernan2023-02-021-0/+60
| | | | | | | | | | | Everything we need for `rust-snapshot.inc` exists in `src/stage0.json`, so just read that to generate it. (From OE-Core rev: a07008da8b02165d271a457e4c215f35cb15b94c) 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>
* meta: remove True option to getVar and getVarFlag calls (again)Martin Jansa2023-02-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | * True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.66.1 -> 1.67.0Alex Kiernan2023-01-319-38/+58
| | | | | | | | | | | | | | | | | 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>
* rust: Remove CARGO_VERSIONAlex Kiernan2023-01-151-2/+1
| | | | | | | | | | | 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: Upgrade 1.66.0 -> 1.66.1Alex Kiernan2023-01-156-1/+1
| | | | | | | | | | | Changes: Added validation of SSH host keys for git URLs in Cargo (CVE-2022-46176) (From OE-Core rev: 3d31afc5666eda95032d0be47ff815859550a65f) 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: Merge all rustc-source patches into rust-source.incAlex Kiernan2023-01-125-23/+10
| | | | | | | | | | | | With the dim-sum approach to patching we had the same patch applied in many places, but not all, so that there were no guarantees that we were actually building agaginst the same thing in all recipes. (From OE-Core rev: 550c273f38d8e6d2d431908023e213c6b018d7ed) 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: Fix build with 64bit time_tKhem Raj2023-01-062-0/+32
| | | | | | | | | | | | | The vendored copy of zlib undefines _FILE_OFFSET_BITS when _LARGEFILE64_SOURCE is defined and enabling 64bit time_t requires 64bit off_t ( _FILE_OFFSET_BITS=64 ), therefore remove this from the zlib module (From OE-Core rev: 73e56624e815c52308a81852430a8bb050a0fc58) 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>
* cargo: Do not use open64 on musl anymoreKhem Raj2022-12-312-1/+4
| | | | | | | | | | The same rust getrandom patch is needed for cargo on target as well as it uses the same crate (From OE-Core rev: 44441c727a5301ab99ab8b4d8b8b1f61f0a810af) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-llvm: Fix build on latest muslKhem Raj2022-12-312-1/+81
| | | | | | | | | latest musl has removed lfs64 functions (From OE-Core rev: 7156416943dc6d772020465917418e3234cc7f66) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust,libstd-rs: Fix build with latest muslKhem Raj2022-12-312-0/+173
| | | | | | | | | | newer musl do not provide lfs64 functions anymore since off_t is always 64bit on musl using normal functions would suffice (From OE-Core rev: f01b2ab83068e4d7f263c31dca2a3fa9ef77a98e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Do not use open64 on musl in getrandom crateKhem Raj2022-12-312-0/+30
| | | | | | | | | LFS64 functions are deprecated in latest musl (From OE-Core rev: 3b63303c62f9d50d835096602f9e09669779fa3e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Drop exclude from worldAlex Kiernan2022-12-281-1/+0
| | | | | | | | | On-target cargo now builds/runs. (From OE-Core rev: eb8b8c5247a32f2bd6b680de6f1a999dc2fcbc5f) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Include crossbeam-utils patchAlex Kiernan2022-12-282-0/+79
| | | | | | | | | | We need patched crossbeam-utils in cargo as well as rust, move cargo alongside rust so they can both use the same patch. (From OE-Core rev: 39402790724014a39b265ee1978396a0514fdc98) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-sourceAlex Kiernan2022-12-282-5/+5
| | | | | | | | | | Any consumer of rust-source (potentially) needs this, so move to rust-source.inc (From OE-Core rev: 3c88cf98361a8f1c6f5183cc8887cccfad9d08ba) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Merge .inc into .bbAlex Kiernan2022-12-283-234/+217
| | | | | | | (From OE-Core rev: a09bcc7db13a7308f523d985332e96461b8feeec) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-llvm: Update LLVM_VERSION to match embedded versionAlex Kiernan2022-12-281-1/+1
| | | | | | | (From OE-Core rev: e75f16c5f0d3e70ae08efd7d61a7e7d0c9380e72) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-llvm: Merge .inc into .bbAlex Kiernan2022-12-282-79/+79
| | | | | | | (From OE-Core rev: 5a8f72fc9ae730be21bbc577d8315ae95f771dba) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs: Move source directory to library/testAlex Kiernan2022-12-231-2/+4
| | | | | | | | | Building libstd-rs from library/std omits proc_macro from the sysroot. Using library/test causes that to be installed which then allows cargo to build (https://github.com/meta-rust/meta-rust/issues/266) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs: Merge .inc into .bbAlex Kiernan2022-12-232-41/+39
| | | | | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Enable building rust from stable, beta and nightly channelsAlejandro Hernandez Samaniego2022-12-213-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rust: update 1.65.0 -> 1.66.0Alex Kiernan2022-12-1711-71/+38
| | | | | | | | | | | | | | 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>
* rust: Install target.json for target rustcAlex Kiernan2022-12-171-0/+3
| | | | | | | | | | | | | | | | As part of the merging builds, installation of target.json was lost causing `rustc` to fail on startup with: error: Error loading target specification: Could not find specification for target "aarch64-poky-linux-gnu". Run `rustc --print target-list` for a list of built-in targets We know the full target specification, so just install it directly rather than using the glob approach from previously. Fixes: b9b0cd99cdc7 ("rust: Enable nativesdk and target builds + replace rust-tools-cross-canadian") (From OE-Core rev: b187185ceecf1c852b1fdc47451d157a41962d69) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.64.0 -> 1.65.0Alex Kiernan2022-11-079-41/+46
| | | | | | | | | | | Release notes: https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html (From OE-Core rev: fa8890188e8971a5707bae1504cb010b54ed3cae) 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: submit a rewritten version of crossbeam_atomic.patch upstreamAlexander Kanavin2022-11-031-1/+1
| | | | | | | | (From OE-Core rev: 4bbfd7427092063dd612d2ca9e466cb819f5a3e3) 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: install rustfmt for riscv32 as wellAlexander Kanavin2022-10-281-1/+0
| | | | | | | | | | With the above rust arch fixes it builds just fine. (From OE-Core rev: f417ae30c79fac99e2549324ed351f6f63cc4a25) 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: update 1.63.0 -> 1.64.0Alex Kiernan2022-10-268-26/+57
| | | | | | | | | | | Release notes: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html (From OE-Core rev: 1d81fb264580b96c405075fcfd2a82a6f74b9630) Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Use libc++ runtime when using clang with llvm runtimeKhem Raj2022-09-121-0/+2
| | | | | | | | | | | | | meta-clang has options when it comes to C++ runtime, default is to use gnu runtime, other options are llvm runtime and android runtime. This patch helps when a distro is using llvm runtime for C/C++ runtime. It informs the rust build system about right C++ runtime to configure for when such a setting is used. (From OE-Core rev: 521872ab2cac092c88446730772cb8c4e22b0cdc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Use variable to specify extra tools to installKhem Raj2022-09-091-1/+3
| | | | | | | | | | | All architectures may not support same set of tools, therefore use a variable to specify this. E.g. on riscv32 rustfmt is not buildable right now. (From OE-Core rev: 332df9ebbd75a1825ac99abf1311d2e692d398d7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>