summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* rust-cross-canadian: Fix for the issue caused by using sdk shellSundeep KOKKONDA2022-09-072-3/+36
| | | | | | | | | | | | | | | This is a fix for the fix in YOCTO #14878. When the shebang is more than 128 characters the default shell /bin/sh is used instead of SDK shell as a fallback, which causes problems with LD_LIBRARY_PATH. With this patch shell usage is avoided as we use a C wrapper and unset LD_LIBRARY_PATH that way. [YOCTO #14892] (From OE-Core rev: 7cd6faf4e0147eef557f83fb266a25935e26efff) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Enable verbose-tests to get the test results in readable formatpgowda2022-09-051-0/+4
| | | | | | | | | | Emits complete details regarding the test results to understand and debug from logfiles (From OE-Core rev: 78aecd6d4e443cb467e9a8007f2db29943dfdd1f) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Add linker configurations for cross compilationpgowda2022-09-051-0/+3
| | | | | | | | | | | Adds the cross compilation linker for build, host and target. Ensure the main rust config has the appropriate sections added to match the configurations. (From OE-Core rev: 02133f92c56c90a5365985b515953e4136e112aa) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-llvm: Update to matching LLVM_VERSION from rust-sourceKhem Raj2022-09-011-1/+1
| | | | | | | | (From OE-Core rev: 7fe15d05811d6cf3172939228f75dbcc55396365) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Fix crossbeam-utils for arches without atomicsRichard Purdie2022-08-313-0/+54
| | | | | | | | | | | crossbeam-utils tries to use the triplet to look up whether the target supports various forms of atomics. We use TARGET_VENDOR and not "-unknown" in the target case which means this fails and breaks platforms like mips and powerpc 32 bit. Add a patch to handle TARGET_VENDOR in this case. (From OE-Core rev: 5d8c01dfed4c82fcc5d504c728a51fb98a262300) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Fix build failure on riscv32Khem Raj2022-08-312-1/+30
| | | | | | | | | | | | | Latest rust has started using ENOTSUP define, which is not available in the older libc that current release of compiler is using therefore backport the needed patch. Eventually when vendored version of libc bumps to 1.33+ we should not need this patch. (From OE-Core rev: 097e38f28990229c3f54f4e6cb74ca8be0b806e6) 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 from 1.62.1 to 1.63.0Randy MacLeod2022-08-316-15/+15
| | | | | | | | | | | | | | | 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>
* rust-cross-canadian: rename shell variables for easier appendsPeter Bergin2022-08-251-4/+4
| | | | | | | | | | | | | | Make unique shell variable names for cargo and rust setup scripts. This change will make it easier to append to the scripts in a bbappend file by using the variable for the script. Before this change it was only possible for the last script as they shared the same variable name. (From OE-Core rev: 74307f57ad0b3c538be0add11028e4e6199a7662) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.62.0 -> 1.62.1Alexander Kanavin2022-08-145-1/+1
| | | | | | | | (From OE-Core rev: 6baa224158f40b9754c3f10e11966d02e1337ae7) 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: Remove unneeded RUST_TARGETGENS settingsRichard Purdie2022-08-122-5/+0
| | | | | | | | | These match the default from the class so drop them. We then always generate all targets so remove the configuration from the class. (From OE-Core rev: e4d56256936c55bab2bf2934ccbde9157ef7dc57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross-canadian: Use shell from SDK, not the hostRichard Purdie2022-08-091-1/+2
| | | | | | | | | | | | rust sets LD_LIBRARY_PATH which causes a lot of problems with host binaries conflicting with SDK libraries. By using sh/bash from the SDK we avoid those issues. [YOCTO #14878] (From OE-Core rev: dabd97e78a599a81c056c0f3291244f5afae44b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Update READMERichard Purdie2022-08-081-23/+3
| | | | | | | | | Update the README to match the current status and remove unclear/obsolete information and fix formatting. (From OE-Core rev: fa5d16692dda655a54653df7b4bf98410090ec5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Ensure buildpaths are handled in debug symbols correctlyRichard Purdie2022-08-081-0/+2
| | | | | | | | | To ensure buildpaths aren't encoded in the debug symbol output, ensure we pass our prefix remapping compiler options in. (From OE-Core rev: c7a529743560c37973787e4ab2433cb7485afb86) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Fix musl buildsRichard Purdie2022-08-081-0/+2
| | | | | | | | | Musl targets need a sysroot set to find the musl static libraries. Set this appropriately in musl builds. (From OE-Core rev: 1c5ab57ddda393631ce2da97ef5a876a2020d51f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Enable nativesdk and target builds + replace rust-tools-cross-canadianRichard Purdie2022-08-085-61/+67
| | | | | | | | | | | | Enable rust target builds as well as nativesdk-rust for the sdk. Merge the builds of rust-tools components into the rust build, packaged separately since this is a lot more efficient and saves rebuilding core rust multiple times. The tools are not target specific so nativesdk-rust-tools suffices and we can drop the cross canadian piece. (From OE-Core rev: b9b0cd99cdc77e7a90e5fd5711e706ebe64c7b6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Drop cross/crosssdkRichard Purdie2022-08-083-63/+0
| | | | | | | | | | Now that target config json is provided by rust-target-config.bbclass, the need for the cross and crosssdk recipes is removed. Drop them and simplify dependencies accordingly. (From OE-Core rev: 4b54f5f52b33db4d2fe95c5faef033b6c6b37b7d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross-canadian: Simplify and fixRichard Purdie2022-08-083-110/+12
| | | | | | | | | | Since a copy of rust can target any target and doesn't need to be target specific, we can simplify rust-cross-canadian to simply contain the json configuration and envirionment setup scripts. (From OE-Core rev: 6ec18de9d6f49bccff72f2665821dbd732b69b48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Drop cross-canadian variant and fix/use nativesdkRichard Purdie2022-08-081-0/+37
| | | | | | | | | | | The cargo-cross-candian variant made no sense as one version of cargo in the SDK can work for all targets. Replace it with nativesdk-cargo instead. Move the SDK env to rust-cross-canadian. (From OE-Core rev: 6d6d135924eff5993736ee58ba8cc5d00ca635f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust.inc: Fix for cross compilation configurationRichard Purdie2022-08-081-5/+15
| | | | | | | | | | For cross compilation, build, host and target may be different. Ensure the main rust config has the appropriate sections added to match the configurations. (From OE-Core rev: e2cdbf9df8d3f90b5a7ba35288c5db4f252d134d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-llvm: Enable nativesdk variantRichard Purdie2022-08-081-1/+8
| | | | | | | | | To allow nativesdk variants of the tools to build, enable a nativesdk variant of rust-llvm. (From OE-Core rev: b4b24dc53fdb86624da71b854dfe018923a203fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common: Handle build SYS as well as HOST/TARGETRichard Purdie2022-08-081-3/+0
| | | | | | | | | Improve the common class to handle BUILD_SYS as well as host and target, removing the need to a workaround in the rust recipe. (From OE-Core rev: 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common/rust: Improve bootstrap BUILD_SYS handlingRichard Purdie2022-08-081-4/+3
| | | | | | | | | | Move the "unknown" vendor workaround used during bootstrap to a central location so it is applied consistently to all RUST_BUILD_SYS values rather than some subset. (From OE-Core rev: d02c28b2219d736c9598a13fead7a03eaa3256a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Generate per recipe target configuration filesRichard Purdie2022-08-082-3/+5
| | | | | | | | | | Instead of generating target configuration files centrally and often getting it wrong, or having trouble finding the right set, generate them dynamically from the bbclass into WORKDIR per recipe. (From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust/mesa: Drop obsolete YOCTO_ALTERNATE_MULTILIB_NAMERichard Purdie2022-08-081-2/+0
| | | | | | | | This variable is no longer used by the llvm patches. (From OE-Core rev: 35e1ecf88cf9725e1ba43c948e90359df983002f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust.inc: Fix cross build llvm-config handlingRichard Purdie2022-08-081-4/+14
| | | | | | | | | | We need llvm-config for the target but the cross compiled target binary is no good. We can copy the native one into the target location where it will then return the target values though. (From OE-Core rev: f355e55c1fcef57f288279ffb47ebeb52a72b689) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust.inc: Rename variables to make code clearerRichard Purdie2022-08-081-10/+10
| | | | | | | | | | Instead of reusing a "target_section" variable, name them host and build section instead. This patch sets things up for other improvementsm, separating out the renaming. (From OE-Core rev: 279b809e8306b0eb6ae6caeb6b0a3c3c62d2f9d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Switch to use RUST_XXX_SYS consistentlyRichard Purdie2022-08-082-7/+7
| | | | | | | | | | | The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use RUST_XXX_SYS consistently and add the variables to the global exclsion on signatures as they're reflected in the directory triplets and trying to filter them out the hashes separately is too painful. (From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>