summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
AgeCommit message (Collapse)Author
2022-06-29rust: fix issue building cross-canadian tools for aarch64 on x86_64Peter Bergin
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>
2022-05-21rust-common: Fix native signature dependency issuesRichard Purdie
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>
2022-05-21rust-common: Drop LLVM_TARGET and simplifyRichard Purdie
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>
2022-05-21rust-common: Fix for target definitions returning 'NoneType' for armSundeep KOKKONDA
[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>
2022-05-21rust-common: Ensure sstate signatures have correct dependencues for ↵Sundeep KOKKONDA
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>
2022-05-13libstd-rs: Forward port rust libc patchesKhem Raj
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>
2022-04-27rust: update 1.59.0 -> 1.60.0Pgowda
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>
2022-04-05Revert "meta: rust: Bug fix for target definitions returning 'NoneType'"Richard Purdie
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>
2022-04-05meta: rust: Bug fix for target definitions returning 'NoneType'Sundeep KOKKONDA
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>
2022-03-26rust-crosssdk: use ${RUST_LIBC} in ${PN}Christian Eggers
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>
2022-03-17rust-cross: Add rust-crosssdk variant for nativesdk useRichard Purdie
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>
2022-03-17libstd-rs: Extend to nativesdkRichard Purdie
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>
2022-03-15libstd-rs: Fix build on riscv64/muslKhem Raj
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>
2022-03-09rust: update 1.58.1 -> 1.59.0Alexander Kanavin
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>
2022-03-02rust: Add snapshot checksums for powerpc64leAndrew Jeffery
(From OE-Core rev: ab0c2de443278625c5db54d5c51e193791f5087c) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02rust: Introduce RUST_BUILD_ARCHAndrew Jeffery
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>
2022-03-02rust: Introduce arch_to_rust_arch()Andrew Jeffery
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>
2022-02-03libstd-rs: Apply patches to right version of libcKhem Raj
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>
2022-02-01rust: update 1.58.0 -> 1.58.1Alexander Kanavin
(From OE-Core rev: 855ec0af1b3c7c2664e68ac89cad839d480c43db) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-20rust: update 1.57.0 -> 1.58.0Alexander Kanavin
(From OE-Core rev: 43895e2967b2c80f4ee353b33ffe422ea7590ff1) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11rust-llvm: apply the same reproducibility patch as for llvm properAlexander Kanavin
(From OE-Core rev: a845029df7ea8c1bd987ffac3902d4521742debb) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-08rust: update 1.56.1 -> 1.57.0Alexander Kanavin
(From OE-Core rev: 295b9d51bad0b0da3ba9acec875972bf5e5ca4d7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-23rust-cross: Replace TARGET_ARCH with TUNE_PKGARCHPgowda
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>
2021-11-21librstd-rs: submit patches upstreamAlexander Kanavin
(From OE-Core rev: f298853c50b50e79a2802e4e1781fea9b53b5f20) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-11rust: update 1.56.0 -> 1.56.1Alexander Kanavin
This update includes fixes for the 'trojan source' vulnerability: https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html Drop two unused patches. (From OE-Core rev: 5ff0b0d8c6c37ebf916062f03a378fe0e34b1c53) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-27rust: add support for big endian 64-bit PowerPCDavid Joyner
(From OE-Core rev: 91cc84afbfa6aad154f9a6402b538ea1b7c0ecd4) Signed-off-by: David Joyner <dbjoyner@amazon.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-23rust: Upgrade to 1.56.0Khem Raj
This is latest major release, changes are here [1] Forward port libstd-rs patches and refresh musl/rv64 port [1] https://github.com/rust-lang/rust/releases/tag/1.56.0 (From OE-Core rev: 183204cbc70a4ef418b16df48bc7eb6e3a75a114) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-23rust-cross: Fix directory not deleted for race glibc vs. muslPgowda
Use different recipe names for the two different targets so that when switching libcs overlapping files in the sysroot don't cause issues. (From OE-Core rev: 33be44a02beb7c52f075f660ad8e0641e360011c) Signed-off-by: Pgowda <pgowda.cve@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14Fix rust-native build issue when debug is enabledPgowda
When DEBUG_BUILD is set for building rust-native, it generated error as follows:- ========================================================= Building : rustdoc, rustdoc-json-types error[E0463]: can't find crate for `rustc_llvm` which `rustc_driver` depends on --> src/librustdoc/lib.rs:37:1 | 37 | extern crate rustc_driver; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate ========================================================= On analyzing the issue, it was found that rustc_llvm crate was present at required path. However, it was very huge due to the presence of debugging information. Hence, it was somehow not recognized as a valid crate. The following patch removes the debug information from rust-llvm-native which is built prior to rust-native but retains debug information as required in rust-native binaries. (From OE-Core rev: 7261a4b4d5778a48c8d72c9125233b1b0bc009e6) Signed-off-by: Pgowda <pgowda.cve@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14rust: generate target definitions from (arch, abi), not just archAlexander Kanavin
This allows to add the missing x32 definition and others in the future. (From OE-Core rev: 79bd6389585327820dfc1a1d29f60779ef08b2e0) 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>
2021-10-14rust: do not write ar into target json definitionsAlexander Kanavin
latest rust does not use it and prints a ton of warnings because of it. (From OE-Core rev: 320f2c5aa535237fab4f4a1e6f75358f53221459) 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>
2021-10-14rust/cargo: exclude UNINATIVE_LOADER from task signatureAlexander Kanavin
(From OE-Core rev: 8915dfa2034d939b504f134e83811ed2ba18a6f1) 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>
2021-10-14rust: update 1.54.0 -> 1.55.0Alexander Kanavin
(From OE-Core rev: a21705c33a6a69e9a625b8a75d76b76bd078aba2) 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>
2021-10-14rust: drop PV from include file namesAlexander Kanavin
This complicates (semi) automated upgrades, and isn't necessary as we carry only a single version of the toolchain. (From OE-Core rev: f7a6b23d99fba5855cfb34788199877a14206293) 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>
2021-09-02rust: remove unused patchesMartin Jansa
* 0001-nfc-Fix-missing-include.patch was only used in 1.51.0 version recently removed * 0001-rustc_target-Fix-dash-vs-underscore-mismatches-in-op.patch was only used in 1.49.0 version in meta-rust (From OE-Core rev: 52b12dac55a3747d8d6f2e799c669ef2bcda57ae) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-01rust: fix upstream version checksAlexander Kanavin
(From OE-Core rev: e2e87d82ad1ec071077f29613e2e568196912daa) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust: Avoid buildtools+uninative issues with glibc symbols mismatchesRichard Purdie
If we use an external buildtools tarball, that combined with uninative results in build failures with symbol mismatches. This was tracked down to the prebuilt rust binaries that are downloaded. The libc/loader used to load them is used to execute target binaries/libraries and therefore anything with built with a newer libc would fail. Add code to use patchelf to change the interpreter to our own uninative one if present which ensures the newer libc and loader are used, hence avoiding the issue. (From OE-Core rev: 099c761ffddcc828329d3083cc8f3d24b43e9277) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust: Skip target recipe since it doesn't workRichard Purdie
The target rust recipe is known not to work. Add a SkipRecipe entry for that so world builds don't include something known to be broken and hence give users a sensible message if they do try and build it rather than a build failure. (From OE-Core rev: 16c77c82ff6635b0180690ea117e2eff8fd63afb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust-llvm: Add missing HOMEPAGERichard Purdie
Add a missing HOMEPAGE entry to the recipe (fixing a selftest failure). (From OE-Core rev: 71782d90cff825bd9c20d49590245565a6194bf8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust-native: Avoid stripped warningRichard Purdie
Instead of giving the following warning, hide it since we don't plan to change it. WARNING: rust-native-1.54.0-r0 do_populate_sysroot: File '/media/build1/poky/build/tmp/work/x86_64-linux/rust-native/1.54.0-r0/recipe-sysroot-native/usr/lib/rustlib/x86_64-linux/bin/rust-llvm-dwp' from rust-native was already stripped, this will prevent future debugging! (From OE-Core rev: ec5f0c77882ccbd5797519f5ded4e528eb687008) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust-cross-canadian-common: Use rust.inc directly, not rust-targetRichard Purdie
We don't want cross-canadian to see the native BBCLASSEXTEND as that generates a recipe which makes no sense. Avoid this. (From OE-Core rev: f3648d18c4e05f38053bb1fd73796a6e05d61928) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust-cross*: Fix OVERRRIDE references in task signature computationRichard Purdie
The oeqa selftest test: sstatetests.SStateTests.test_sstate_sametune_samesigs which checks if the sstate checksums of two identical machines (using the same tune) are the same, apart from changes within the machine specific stamps directory, fails on the assertion: self.assertCountEqual(files1, files2) due to the signature of various 32 bit package builds such as: x86_64-linux/lib32-rust-cross-i686 x86_64-linux/rust-cross-i686 x86-pokymllib32-linux/lib32-libstd-rs x86-pokymllib32-linux/lib32-rust differing. Jumping down the rabbit hole past all the bitbake-diffsig outputs that differ due to dependent hashes, you come to a diff of: -Variable MACHINEOVERRIDES value is ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}qemuall:${MACHINE} +Variable MACHINEOVERRIDES value is ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}qemuall:${MACHINE}:qemux86 in stamps/x86_64-linux/rust-cross-i686/1.54.0-r0.do_rust_gen_target.<sig> This is because there are two rust functions referencing OVERRIDES related variables (target_is_armv7 and llvm_features_from_tune). These indirectly influnce the build and should be excluded from the signatures directly as is done in other toolchain recipes, e.g.: 39bfa0dd32 recipes/*-cross recipes: ignore TARGET_ARCH sstate hash (From OE-Core rev: 72d67410e92207a98a801ddf0cb9f1297a752975) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust: remove Rust version 1.51.0 toolchainRandy MacLeod
We typically only have one version so remove the older rust toolchain. This also fixes a maintainers oe-selftest. (From OE-Core rev: d8ff9672d2686801d535a91fa28a92e38d8f0409) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust-common.inc: Fix build failure with qemuppc64.Vinay Kumar
The glibc build of "rust-hello-world" throws error in libstd-rs package. error: unrecognized arch "powerpc64le" in target specification The same got fixed by changing the arch to "powerpc64". (From OE-Core rev: 1a28dd447c248f6b7f0efd121160ac798e2abf0c) Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust: update the README to conform to being in oe-coreRandy MacLeod
Provide the full link to the meta-rust issue since the README is no longer part of meta-rust. (From OE-Core rev: 11cb8e67f356d4758c3aae0e5851a44256459e77) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust: mv README.md to recipes-devtools/rust/README-rust.mdRandy MacLeod
Import the meta-rust/README.md but relocate and rename it. (From OE-Core rev: a36b43187f9b78c279bdbd0ee9c6f7063a0e7cc7) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26rust: initial merge of most of meta-rustRandy MacLeod
In the meta-rust repo at commit: 448047c Upgrade to 1.54.0 (#359) Make the required directories: mkdir ../oe-core/meta/recipes-devtools/rust mkdir ../oe-core/meta/recipes-devtools/cargo mkdir ../oe-core/meta/recipes-example and then: cp recipes-devtools/rust/* ../oe-core/meta/recipes-devtools/rust cp recipes-devtools/cargo/* ../oe-core/meta/recipes-devtools/cargo cp lib/crate.py ../oe-core/meta/lib cp recipes-example/* ../oe-core/meta/recipes-example cp conf/distro/include/rust_* ../oe-core/meta/conf/distro/include/ cp classes/* ../oe-core/meta/classes/ cp recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb ../oe-core/meta/recipes-core/packagegroups (From OE-Core rev: 3ed57578cca93ff1ba4e0bf3f25566e10659a2f9) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>