]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust: handle softfp fpu
authorPeter Marko <peter.marko@siemens.com>
Thu, 21 Aug 2025 12:26:55 +0000 (14:26 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Aug 2025 09:47:02 +0000 (10:47 +0100)
With TARGET_FPU set to "softfp" stdlib-rs fails with:
error: Error loading target specification: ARM targets must specify their float ABI. Run `rustc --print target-list` for a list of built-in targets

This fpu type is set for example for arm in file
meta/conf/machine/include/arm/feature-arm-vfp.inc
when TUNE_FEATURES do not contain "callconvention-hard",
e.g. when using tune
DEFAULTTUNE = "cortexa8"

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rust-target-config.bbclass

index 0df6f0904cb27faefc978c318c3e7bcab7d60c2e..8ab5317c3f358a8d080b3c2bff7b2b07dde4a8b5 100644 (file)
@@ -409,7 +409,7 @@ def rust_gen_target(d, thing, wd, arch):
     if features != "":
         tspec['features'] = features
     fpu = d.getVar('TARGET_FPU')
-    if fpu == "soft":
+    if fpu in ["soft", "softfp"]:
         tspec['llvm-floatabi'] = "soft"
     elif fpu == "hard":
         tspec['llvm-floatabi'] = "hard"