summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/rust-target-config.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* rust-target-config: fix feature for vfpv4f16Willy Tu2024-04-251-0/+3
| | | | | | | | | | | | | | | | Based on [1] which fixed the target for vfpv3d16. Adding the support for vfpv4d16 with the same set of changes. Tested with running tokio which hit coredump before the change. It worked fine after this change. [1] https://lists.openembedded.org/g/openembedded-core/message/185702 (From OE-Core rev: 8fb2f9f60962339c877949f619e1e72d33bf3080) Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Map rust target to OE targetKhem Raj2023-09-071-0/+2
| | | | | | | (From OE-Core rev: caca883b524a767d970d934744b0f2b0ef743e20) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: fix target_features for vfpv3d16Benjamin Bara2023-08-141-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | A build with vfpv3d16 (armv7at2hf-vfpv3d16) tune currently warns: '+d16' is not a recognized feature for this target (ignoring feature) This correlates with the supported target_features for arm[1]. With the now enabled features, rustc might use vdiv.f64 with register d17, which leads to an illegal instruction on the given platform. Therefore, adapt the features s.t. they correspond to the armv7_unknown_linux_gnueabihf target[2]. Additionally, only set the latest supported version of VFP. [1] https://github.com/rust-lang/rust/blob/1.70.0/compiler/rustc_codegen_ssa/src/target_features.rs#L32 [2] https://github.com/rust-lang/rust/blob/1.70.0/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs#L15 (From OE-Core rev: d79f0a0702b667625e12c9e131932e02cb08bada) Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class-recipe: add support for loongarch64Jialing Zhang2023-03-231-0/+11
| | | | | | | | | (From OE-Core rev: ec88f703f753efcbad5c077d866a5dc44ad54db0) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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: Do not use default compiler flags defined in CC crateAnton Antonov2023-01-121-0/+16
| | | | | | | | | | | | | | | | | | | | | Rust crates build dependecy C libraries using "CC" crate. This crate adds some default compiler parameters depending on target arch. For some targets these parameters conflict with the parameters defined by OE. Warnings/errors like this can be seen in the case: cc1: error: switch '-mcpu=cortex-a15' conflicts with switch '-march=armv7-a+fp' [-Werror] Lets use only the OE parameters by exporting CRATE_CC_NO_DEFAULTS. https://github.com/rust-lang/cc-rs#external-configuration-via-environment-variables This patch fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=14947 (From OE-Core rev: 0c07089bdf7e0d7d8f37552db0bcd75f860979d9) Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Enable baremetal targetsAlejandro Hernandez Samaniego2022-12-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | Allow rust to build for baremetal targets by generating the proper target triple, follow the format specified by rusts Triple [1], that is: <arch>-<vendor>-<os>-<abi> This is done automatically based on both TARGET_OS and TCLIBC. For example, a riscv64 baremetal target triple would look like this: riscv64gc-poky-none-elf matching rusts own target triple for riscv64 according to platform-support [2] [1] https://docs.rs/target-lexicon/latest/target_lexicon/struct.Triple.html [2] https://doc.rust-lang.org/stable/rustc/platform-support.html (From OE-Core rev: 3bff689f0c5ea73076ce0510872b0552e8660cbe) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: match riscv target names with what rust expectsAlexander Kanavin2022-10-281-14/+26
| | | | | | | | | | | | | | | | | | | | Official rust risc-v targets are prefixed with riscv32gc- and riscv64gc-: https://doc.rust-lang.org/nightly/rustc/platform-support.html Particularly crossbeam-utils make important build time decisions for atomics based on those names, and so we need to match ours with official targets. On the other hand, the actual definitions for those targets do not use the 'gc' suffix in 'arch' and 'llvm-target' fields, and so we need to follow that too, to avoid cryptic mismatch errors from rust-llvm: https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs (From OE-Core rev: 1cfb9c8a59d98ccc9b0510cd28fb933f72fb6b6c) 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-target-config: Fix qemuppc target cpu optionRichard Purdie2022-08-311-2/+3
| | | | | | | | | We see a lot of warnings about incorrect processor types on qemuppc, drowning out anything else. Fix the option. (From OE-Core rev: 0371e429d9e127983ddfaec366ce1c38c99158e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Drop has-elf-tls optionRichard Purdie2022-08-301-1/+0
| | | | | | | | | | | This option doesn't seem to exist any more and causes lots of warnings. Remove it. (From OE-Core rev: 8e1614a906086fb46c5dd7b7f2dffab91194165c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-0/+391
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>