From: Benjamin Bara <[email protected]> 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]. [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 Signed-off-by: Benjamin Bara <[email protected]> --- meta/classes-recipe/rust-target-config.bbclass | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass index 21a56ede3e..7d3965ed2e 100644 --- a/meta/classes-recipe/rust-target-config.bbclass +++ b/meta/classes-recipe/rust-target-config.bbclass @@ -19,18 +19,22 @@ def llvm_features_from_tune(d): mach_overrides = d.getVar('MACHINEOVERRIDES') mach_overrides = frozenset(mach_overrides.split(':')) + if target_is_armv7(d): + f.append('+v7') + if 'vfpv4' in feat: f.append("+vfp4") - if 'vfpv3' in feat: + if 'vfpv3' in feat or 'vfpv3d16' in feat: f.append("+vfp3") - if 'vfpv3d16' in feat: - f.append("+d16") - if 'vfpv2' in feat or 'vfp' in feat: f.append("+vfp2") + if 'vfpv3d16' in feat: + f.append("-d32") if 'neon' in feat: f.append("+neon") + else: + f.append("-neon") if 'mips32' in feat: f.append("+mips32") @@ -38,9 +42,6 @@ def llvm_features_from_tune(d): if 'mips32r2' in feat: f.append("+mips32r2") - if target_is_armv7(d): - f.append('+v7') - if ('armv6' in mach_overrides) or ('armv6' in feat): f.append("+v6") if 'armv5te' in feat: --- base-commit: b2594471209fafd45ea907371b5bd26df95ab2ac change-id: 20230801-rust-vfpv3d16-a65080a9bcfa Best regards, -- Benjamin Bara <[email protected]>
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#185433): https://lists.openembedded.org/g/openembedded-core/message/185433 Mute This Topic: https://lists.openembedded.org/mt/100513507/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
