summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* rust: Work around reproducibility issuesRichard Purdie2022-08-082-0/+73
| | | | | | | | | | | | Add a patch which removes the sections of code which encode buildpaths. Whilst not ideal, the patches at least show where the problematic data is coming from and should allow more focused work to resovle it by someone who has a better understanding of rust and what this code is doing. It does look unlikely we actually need this code in our usecases anyway. (From OE-Core rev: c08c522fc29445aef0c64f0dd8df8a3531c04afa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Allow the targets generated to be configurableRichard Purdie2022-07-282-14/+2
| | | | | | | | | Remove further code duplication by allowing the main function to be configurable. (From OE-Core rev: 2d4b35a0db1220e7a7f1b6776223aa4d40a3f246) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Create new class to contain target json config generationRichard Purdie2022-07-282-370/+1
| | | | | | | | | | | | | Currently most of the rust recipes use this code but it is all piecemeal. Turn the code into a class where things can start to be rationalised. Ultimately some of the data and python code should be moved to a python library but one step at a time. No functionality changes. (From OE-Core rev: 3795285cbf362e13b8151bfdbe1bce999ac28641) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common/rust-cross: Clean up target json generation codeRichard Purdie2022-07-283-23/+22
| | | | | | | | | | | | | Some of the subtleties in the different codepaths for target rust json generation were not easy to spot. Start to simplfy the code to make this clearer. This patch should not have any functionality change although ABIEXTENSION has to be excluded from the function signature, the triplet would normally cover anything set there. (From OE-Core rev: 0f83d959465e0d99f98ade6803281585931d1b02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross: Simplfy the rust_gen_target callsRichard Purdie2022-07-282-18/+10
| | | | | | | | | Match the code in rust-cross-canadian so that further simplifications can be considered in future. (From OE-Core rev: 5cb62d0a33777cb9afb1eea5f736a2580ce50dc7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross/rust-common: Merge arm target handling code to fix cross-canadianRichard Purdie2022-07-282-6/+7
| | | | | | | | | | | | | rust-cross had special handling for armv7 targets but we also need this for cross-canadian. Merge the code into the main function so everything is consistent. Also then fix the arm definition to be arm-eabi since ABI is correctly being looked up. (From OE-Core rev: ff3c3dbbd2bf1bb7bb70b55cca203e9eedcf14a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross-canadian: Fix ordering of target json config generationRichard Purdie2022-07-281-2/+3
| | | | | | | | | | | Based upon a patch from Otavio Salvador <otavio@ossystems.com.br>, ensure the target json files are written in the correct order with the most specific last incase it overwrites earlier files if the prefixes match. (From OE-Core rev: 1912c4e9e0ecf9655f3b3a41588b54d7956f5899) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Set llvm-target correctly for cross SDK targetsRichard Purdie2022-07-281-1/+5
| | | | | | | | | | | | | | | | | | When a 'BUILD' target is requested we shouldn't be looking at TARGET_SYS but at BUILD_SYS. Due to the way rust mangles triplets, we need the HOST_SYS triplet to work with existing code - fixing that issue is a separate patch. Also drop the arch_abi argument, it doens't make any sense to a getVar() call and was a copy and paste error. Based on a patch from Otavio Salvador <otavio@ossystems.com.br> but separated out and tweaked. Fixes: bd36593ba3 ("rust-common: Drop LLVM_TARGET and simplify") (From OE-Core rev: d554161a045d12411f288394e253c54aa4c1257c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.60.0 -> 1.62.0Alexander Kanavin2022-07-0813-86/+23
| | | | | | | | | | | | | Drop the two libstdc patches as they've finally appeared upstream. Disable the use of libstdc++.a from the host distributions, as it results in cross-distro contamination in rust-native. (From OE-Core rev: 94760bc118952160865352c10ca7693680b5ce7e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: fix issue building cross-canadian tools for aarch64 on x86_64Peter Bergin2022-06-291-4/+1
| | | | | | | | | | | | | | Commit bd36593ba3db758b3eacc974e48468a665967961 did introduce a regression when building package rust-cross-canadian-aarch64 on a x86_64 host. This commit will fix that configuration. Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: ef566af964e9f9d2c440a3b5771ed801216f30f9) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Fix native signature dependency issuesRichard Purdie2022-05-211-0/+3
| | | | | | | | | | | The previous changes cause sstatetests.SStateTests.test_sstate_32_64_same_hash to fail since RUST_XXX_SYS changes depending on the native architecture. This is correct but these are accounted for in the layout of paths in TMPDIR so they should be excluded from the task signatures for the correct behaviour. (From OE-Core rev: 2b9bb4c07d0ab53f58cbdd8a96896780a90be9a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Drop LLVM_TARGET and simplifyRichard Purdie2022-05-212-19/+5
| | | | | | | | | | This all seems over complicated for something which is basically always one of two values. This might even help cross-canadian work on something which isn't x86-64. (From OE-Core rev: bd36593ba3db758b3eacc974e48468a665967961) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Fix for target definitions returning 'NoneType' for armSundeep KOKKONDA2022-05-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #14742] The build shows below error while building for arm machines. Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' Detailed error info : Steps to reproduce: 1. Set MACHINE ?= "qemuarm" in local.conf & add 'TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}"' 2. bitbake core-image-minimal -cpopulate_sdk Complete Error: ERROR: rust-cross-canadian-arm-1.59.0-r0 do_rust_gen_targets: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_rust_gen_targets(d) 0003: File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', lineno: 31, function: do_rust_gen_targets 0027: 0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}" 0029:python do_rust_gen_targets () { 0030: wd = d.getVar('WORKDIR') + '/targets/' *** 0031: rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) 0032: rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) 0033: rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) 0034:} 0035: File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-common.inc', lineno: 330, function: rust_gen_target 0326: # build tspec 0327: tspec = {} 0328: tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi) 0329: tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) *** 0330: tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) 0331: tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) 0332: tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) 0333: tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) 0334: tspec['arch'] = arch_to_rust_target_arch(rust_arch) Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' Below are the local variables from rust_gen_target function for arm and aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType. (a) Locals at rust_gen_target for arm:: tspec['data-layout'] = None, Type of tspec['data-layout'] = <class 'NoneType'> tspec['data-layout'] = None, Type of tspec['data-layout'] = <class 'NoneType'> DEBUG: Python function do_rust_gen_targets finished (b) Locals at rust_gen_target for aarch64:: tspec['data-layout'] = aarch64-unknown-linux-gnu, Type of tspec['data-layout'] = <class 'str'> tspec['max-atomic-width'] = 128, Type of tspec['max-atomic-width'] = <class 'int'> Reason for changing arm-eabi to arm: The earlier changes introduced this bug, so reverting the change 'arm-eabi' to 'arm' fixed the issue. (From OE-Core rev: 8ed000debb026477abd86ea3bf72adaf21d69f39) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Ensure sstate signatures have correct dependencues for ↵Sundeep KOKKONDA2022-05-211-0/+2
| | | | | | | | | | | | | do_rust_gen_targets The do_rust_gen_targets task was not rerunning when the configuration variables it uses were changed. Add the missing variable dependencies to fix this. [RP: Split to separate patch and add commit message] (From OE-Core rev: 65ce2d129154d4540cb8ec960971bcf6aa5a9480) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs: Forward port rust libc patchesKhem Raj2022-05-132-12/+9
| | | | | | | | | | | | libstd-rs update also updated the vendored libc to 0.2.116, the rv64 musl patches were applied to 0.2.112 and hence needed forward porting done with this changeset. (From OE-Core rev: e3a910af0c0c4e07b15d03e9625760f98c67e874) 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: update 1.59.0 -> 1.60.0Pgowda2022-04-2713-23/+50
| | | | | | | | | | | | | | Rust has been upgraded to rust-1.60.0 that uses LLVM 14. Please refer the following link for more detailed features. https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html https://github.com/rust-lang/rust/blob/master/RELEASES.md (From OE-Core rev: 786a9a66486cf179ee4c9e295569fcd8c37fef78) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "meta: rust: Bug fix for target definitions returning 'NoneType'"Richard Purdie2022-04-051-14/+14
| | | | | | | | | This reverts commit ef49f89c89889466ee3696ab680f8e10c961a677. This appears to cause build failures which didn't originally show up in testing, reverting for now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: rust: Bug fix for target definitions returning 'NoneType'Sundeep KOKKONDA2022-04-051-14/+14
| | | | | | | | | | | | | | | The build shows below error while building for arm machines. Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' Detailed error info : https://lists.openembedded.org/g/openembedded-core/message/164004 All the target definitions within tspec dictionary are generted as NoneType. The changes will fix this issue. (From OE-Core rev: ef49f89c89889466ee3696ab680f8e10c961a677) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-crosssdk: use ${RUST_LIBC} in ${PN}Christian Eggers2022-03-261-1/+1
| | | | | | | | | | | TCLIBC is only valid for TARGET, not for HOST or NATIVESDK. Fixes build of rust-crosssdk if TCLIBC is set to musl. (From OE-Core rev: c0b353d19d4cd796e5e63c6bec72962854fe81f4) Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross: Add rust-crosssdk variant for nativesdk useRichard Purdie2022-03-173-7/+14
| | | | | | | | | Allow nativesdk recipes to find a correct version of the rust cross compiler. (From OE-Core rev: 0f5d26772abfbbae9096fa43901d8620f76aea3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs: Extend to nativesdkRichard Purdie2022-03-171-0/+2
| | | | | | | | | This is needed to add the rust standard library to SDKs for use by SDK tools. (From OE-Core rev: 060057fa94451586e4eb47f68bc5c7c796f7d337) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs: Fix build on riscv64/muslKhem Raj2022-03-153-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Backport necessary patch, which was dropped in upgrade to 1.59 Fixes: error[E0425]: cannot find value `SYS_clone3` in this scope --> library/std/src/sys/unix/weak.rs:202:17 | 202 | concat_idents!(SYS_, $name), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `SYS_clone` | ::: library/std/src/sys/unix/process/process_unix.rs:165:9 | 165 | / raw_syscall! { 166 | | fn clone3(cl_args: *mut clone_args, len: libc::size_t) -> libc::c_long 167 | | } | |_________- in this macro invocation | (From OE-Core rev: f529401cd8d2c45273f706636e5ed89123238200) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.58.1 -> 1.59.0Alexander Kanavin2022-03-0913-1624/+17
| | | | | | | | | Drop libstd-rs patches as they're merged upstream. (From OE-Core rev: 05f4a09899aa8dbb22ef1adb494abac41d5b96b7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Add snapshot checksums for powerpc64leAndrew Jeffery2022-03-021-0/+4
| | | | | | | (From OE-Core rev: ab0c2de443278625c5db54d5c51e193791f5087c) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Introduce RUST_BUILD_ARCHAndrew Jeffery2022-03-022-7/+7
| | | | | | | | | | | | | RUST_BUILD_ARCH contains the arch_to_rust_arch()-translated value of BUILD_ARCH. This is necessary to acquire the correct snapshot artifacts under Linux where `uname -m` reports "ppc64le" rather than "powerpc64le". Change-Id: I6aec23aced8e1c6f0bfc46fe52531b0c16bcf687 (From OE-Core rev: c13afbade8d480807b9de70c56dcd650496f06b2) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Introduce arch_to_rust_arch()Andrew Jeffery2022-03-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On modern Power systems `uname -m` yields 'ppc64le' while the toolchain knows the architecture as 'powerpc64le'. Provide a mapping from one to the other to integrate with the existing architecture configuration flags. arch_to_rust_arch() only exists to map the OE *_ARCH variables before any further processing, unlike arch_to_rust_target_arch() which is specific to the internal triple handling of rust. On Linux ppc64le systems the changes give the following config: ``` $ cat ./tmp/work/ppc64le-linux/rust-native/1.58.0-r0/targets/ppc64le-linux.json { "llvm-target": "powerpc64le-unknown-linux-gnu", "data-layout": "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512", "max-atomic-width": 64, "target-pointer-width": "64", "target-c-int-width": "64", "target-endian": "little", "arch": "powerpc64", "os": "linux", "env": "gnu", "vendor": "unknown", "target-family": "unix", "linker": "gcc", "cpu": "generic", "dynamic-linking": true, "executables": true, "linker-is-gnu": true, "linker-flavor": "gcc", "has-rpath": true, "has-elf-tls": true, "position-independent-executables": true, "panic-strategy": "unwind" } ``` Change-Id: Ief0c01189185d7d4da31d307270bec4e1de674ca (From OE-Core rev: 9ab61e3cfef0157393cb870d606c2f362e190889) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libstd-rs: Apply patches to right version of libcKhem Raj2022-02-034-31/+18
| | | | | | | | | | | | 1.58 rust libstd is locked to use 0.2.106, therefore patch the correct version. once we start using 0.2.108+ these patches will not be required as the port is available then on. (From OE-Core rev: 83a9d2ba188b3a95d01ef62763d33b89435f8a1a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.58.0 -> 1.58.1Alexander Kanavin2022-02-017-1/+2
| | | | | | | (From OE-Core rev: 855ec0af1b3c7c2664e68ac89cad839d480c43db) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.57.0 -> 1.58.0Alexander Kanavin2022-01-2014-56/+75
| | | | | | | (From OE-Core rev: 43895e2967b2c80f4ee353b33ffe422ea7590ff1) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-llvm: apply the same reproducibility patch as for llvm properAlexander Kanavin2022-01-112-1/+33
| | | | | | | (From OE-Core rev: a845029df7ea8c1bd987ffac3902d4521742debb) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: update 1.56.1 -> 1.57.0Alexander Kanavin2021-12-088-6/+12
| | | | | | | (From OE-Core rev: 295b9d51bad0b0da3ba9acec875972bf5e5ca4d7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-cross: Replace TARGET_ARCH with TUNE_PKGARCHPgowda2021-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rust-cross-* imported from meta-rust has incorrect signatures, depending on MACHINEOVERRIDES making it effectively MACHINE_ARCH as shown by sstate-diff-machines.sh: openembedded-core/scripts/sstate-diff-machines.sh --tmpdir=tmp-glibc \ --machines="qemuarm64 qemuarm64copy" --targets=rust-cross-aarch64-glibc \ --analyze === Comparing signatures for task do_configure.sigdata between qemuarm64 and qemuarm64copy === ERROR: gcc-runtime different signature for task do_configure.sigdata between qemuarm64 and qemuarm64copy NOTE: Starting bitbake server... Hash for dependent task gcc/gcc-runtime_11.2.bb:do_prepare_recipe_sysroot changed from da4ebf1b272cb73153145a0a95e6438d2955ae2d36f84db10f6880b2781ec331 to 47a0ebb7a88c9f896fb9dbce269f575ab8a6faabb2b9e62d164be6e71c5e4e40 Unable to find matching sigdata for openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_11.2.bb: do_prepare_recipe_sysroot with hashes da4ebf1b272cb73153145a0a95e6438d2955ae2d36f84db10f6880b2781ec331 or 47a0ebb7a88c9f896fb9dbce269f575ab8a6faabb2b9e62d164be6e71c5e4e40 The following patch takes TUNE_PKGARCH into consideration instead of TARGET_ARCH and results in signatures as expected. [YOCTO #14613] RP: Added maintainer.inc corresponding change (From OE-Core rev: bcf48766d1123cea41f80b0cb687584692c96158) Signed-off-by: Pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* librstd-rs: submit patches upstreamAlexander Kanavin2021-11-214-0/+4
| | | | | | | (From OE-Core rev: f298853c50b50e79a2802e4e1781fea9b53b5f20) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>