diff mbox series

[meta-lts-mixins,scarthgap/rust,11/11] rust-target-config: Fix ABI override for powerpc64le target

Message ID 00c30d00f7377ee426b017bb46dd8c4c7eeea03b.1762633051.git.scott.murray@konsulko.com
State New
Headers show
Series Update to Rust 1.90.0 | expand

Commit Message

Scott Murray Nov. 8, 2025, 8:19 p.m. UTC
From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

Ensure the powerpc64le check is exclusive by using `elif`, preventing the
powerpc64 condition from overriding it. This keeps the ABI as elfv2 for
PPC64LE and fixes related build failures.

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>
(adapted from oe-core commit 1d4067329d0b84f94aaf2f63d282bb9c99ba5557)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 classes-recipe/rust-target-config.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/classes-recipe/rust-target-config.bbclass b/classes-recipe/rust-target-config.bbclass
index b9198c7..b5d0d18 100644
--- a/classes-recipe/rust-target-config.bbclass
+++ b/classes-recipe/rust-target-config.bbclass
@@ -388,7 +388,7 @@  def rust_gen_target(d, thing, wd, arch):
         tspec['llvm-abiname'] = "lp64d"
     if "powerpc64le" in tspec['llvm-target']:
         tspec['llvm-abiname'] = "elfv2"
-    if "powerpc64" in tspec['llvm-target']:
+    elif "powerpc64" in tspec['llvm-target']:
         tspec['llvm-abiname'] = "elfv1"
     tspec['vendor'] = "unknown"
     tspec['target-family'] = "unix"