diff options
author | Benjamin Bara <benjamin.bara@skidata.com> | 2023-08-09 15:11:32 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-14 12:51:21 +0100 |
commit | 7865ffaf5734acb9903d40ad8509d51f265645bf (patch) | |
tree | 95cd254afef76813fd6cc7606d9acdd60c0f5c5b /meta/classes-recipe/rust-target-config.bbclass | |
parent | 3a54693243fa86402ac6b1ca3e4fdd3d36a90830 (diff) | |
download | poky-7865ffaf5734acb9903d40ad8509d51f265645bf.tar.gz |
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>
Diffstat (limited to 'meta/classes-recipe/rust-target-config.bbclass')
-rw-r--r-- | meta/classes-recipe/rust-target-config.bbclass | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass index 21a56ede3e..9aa1fc4da5 100644 --- a/meta/classes-recipe/rust-target-config.bbclass +++ b/meta/classes-recipe/rust-target-config.bbclass | |||
@@ -21,16 +21,18 @@ def llvm_features_from_tune(d): | |||
21 | 21 | ||
22 | if 'vfpv4' in feat: | 22 | if 'vfpv4' in feat: |
23 | f.append("+vfp4") | 23 | f.append("+vfp4") |
24 | if 'vfpv3' in feat: | 24 | elif 'vfpv3' in feat: |
25 | f.append("+vfp3") | 25 | f.append("+vfp3") |
26 | if 'vfpv3d16' in feat: | 26 | elif 'vfpv3d16' in feat: |
27 | f.append("+d16") | 27 | f.append("+vfp3") |
28 | 28 | f.append("-d32") | |
29 | if 'vfpv2' in feat or 'vfp' in feat: | 29 | elif 'vfpv2' in feat or 'vfp' in feat: |
30 | f.append("+vfp2") | 30 | f.append("+vfp2") |
31 | 31 | ||
32 | if 'neon' in feat: | 32 | if 'neon' in feat: |
33 | f.append("+neon") | 33 | f.append("+neon") |
34 | elif target_is_armv7(d): | ||
35 | f.append("-neon") | ||
34 | 36 | ||
35 | if 'mips32' in feat: | 37 | if 'mips32' in feat: |
36 | f.append("+mips32") | 38 | f.append("+mips32") |