Deepesh Varatharajan
1652df1273
rust-target-config: Update the data layout for x86 , ppc , riscv64 , aarch64 and loongaarch64 targets.
...
-----------------------------------------------------------------------------------------
error: data-layout for target `x86-linux`, `e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128`,
differs from LLVM target's `i686-unknown-linux-gnu` default layout,
`e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128`
error: data-layout for target `powerpc-linux`, `E-m:e-p:32:32-i64:64-n32`,
differs from LLVM target's `powerpc-unknown-linux-gnu` default layout,
`E-m:e-p:32:32-Fn32-i64:64-n32`
error: data-layout for target `x86_64-poky-linux-gnux32`,
`e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`,
differs from LLVM target's `x86_64-poky-linux-gnux32` default layout,
`e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
-------------------------------------------------------------------------------------------
Rust commits for updating the data layouts:
x86: dbff90c2a7
x86_64-x32: ec55a05374
aarch64: 4d397d33da
ppc: ad7ea8b7e6
riscv64gc: f414715ebf
loongaarch64: 4a06a5bc7a
(From OE-Core rev: 5136176198d4d150afa39b50dc4e879f5b206909)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
2025-01-14 11:57:52 +00:00
Harish Sadineni
76c247d6f5
rust-target-config: Fix TARGET_C_INT_WIDTH with correct size
...
[YOCTO #15600 ]
The TARGET_C_INT_WIDTH value was incorrectly set to 64 instead of 32.
It is updated for PPC, Mips, and riscv64 architectures.
Discussion links for solution:
https://lists.openembedded.org/g/openembedded-core/message/207486
https://lists.openembedded.org/g/openembedded-core/message/207496
(From OE-Core rev: b9df8cd8b29064d115dab3bfd1ea14f94a5c0238)
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
2024-11-23 14:44:54 +00:00
Deepesh Varatharajan
2d04e3e76f
rust-target-config: Update the data layout for x86-64 target
...
The data layout for x86-64 target was different in rust from llvm.
It resulted in the following data layout error:
--------------------------------------------------------------------------------------
error: data-layout for target `x86_64-linux`, `e-m:e-i64:64-f80:128-n8:16:32:64-S128`,
differs from LLVM target's `x86_64-unknown-linux-gnu` default layout,
`e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
--------------------------------------------------------------------------------------
The issue was reported in meta-rust layer as:
https://github.com/meta-rust/meta-rust/pull/442
Hence, the data layout for x86-64 is modified as per the llvm sources which fixes the issue.
After running the testsuite with the modified data layout; it was observed that the
"tests/codegen/i128-x86-align.rs" passed. The modified data layout fixed the scalar pair which
resolved the testcase failure. Hence, the testcase has been removed from the exclude list.
(From OE-Core rev: 96f11d299b32a32086eb3d890c88eb7ce42057b0)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com >
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
2024-10-22 12:28:18 +01:00
Tronje Krabbe
e262b51740
rust-target-config: Update data layouts for 32-bit arm targets
...
update the rust data layout to sync with LLVM [1]
fixes the following build
error:
error: data-layout for target `arm-poky-linux-gnueabi`, `e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64`, differs from LLVM target's `armv7-unknown-linux-gnueabihf` default layout, `e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64`
meta-rust issue report with rust 1.76 [2]
[1] 308e82eceb
[2]: https://github.com/meta-rust/meta-rust/issues/444
(From OE-Core rev: 802376953ed9f1b3e64b3cf57374c58d7ac68d88)
Signed-off-by: Tronje Krabbe <tkrabbe@jusst.de >
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 >
2024-06-26 14:33:42 +01:00
Willy Tu
64d28fb55d
rust-target-config: fix feature for vfpv4f16
...
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 >
2024-04-25 10:19:28 +01:00
Khem Raj
f606c04ee4
rust-target-config: Map rust target to OE target
...
(From OE-Core rev: caca883b524a767d970d934744b0f2b0ef743e20)
Signed-off-by: Khem Raj <raj.khem@gmail.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
2023-09-07 07:53:51 +01:00
Benjamin Bara
7865ffaf57
rust-target-config: fix target_features for vfpv3d16
...
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 >
2023-08-14 12:51:21 +01:00
Jialing Zhang
46186808bd
class-recipe: add support for loongarch64
...
(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 >
2023-03-23 22:36:46 +00:00
Martin Jansa
94149c4f37
meta: remove True option to getVar and getVarFlag calls (again)
...
* 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 >
2023-02-02 09:50:02 +00:00
Anton Antonov
755ee95a45
rust: Do not use default compiler flags defined in CC crate
...
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 >
2023-01-12 23:08:58 +00:00
Alejandro Hernandez Samaniego
901f7ed6ba
rust: Enable baremetal targets
...
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 >
2022-12-21 10:16:31 +00:00
Alexander Kanavin
6608c076f6
rust-target-config: match riscv target names with what rust expects
...
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 >
2022-10-28 09:44:52 +01:00
Richard Purdie
cfd49050a5
rust-target-config: Fix qemuppc target cpu option
...
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 >
2022-08-31 10:40:07 +01:00
Richard Purdie
4830a76a3c
rust-target-config: Drop has-elf-tls option
...
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 >
2022-08-30 10:33:35 +01:00
Richard Purdie
fd1517e2b5
classes: Update classes to match new bitbake class scope functionality
...
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 >
2022-08-12 15:27:17 +01:00