Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] rust-target-config: Set elfv2 ABI for powerpc64 when using ppc64p9le tune
@ 2025-10-23 16:15 Deepesh.Varatharajan
  2025-10-26 13:23 ` [OE-core] " Mathieu Dubois-Briand
  0 siblings, 1 reply; 3+ messages in thread
From: Deepesh.Varatharajan @ 2025-10-23 16:15 UTC (permalink / raw)
  To: openembedded-core; +Cc: Sundeep.Kokkonda, Deepesh.Varatharajan

From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

For the powerpc64 machine with ppc64p9le tune, the supported ABI is elfv2
but the default elfv1 ABI is used and this causes link-time errors such as:

    ABI version 1 is not compatible with ABI version 2 output

To resolve this, the powerpc64 machine with ppc64p9le tune is updated
with elfv2 ABI otherwise, default to elfv1 ABI. This change ensures
consistent ABI behavior across LLVM and Rust builds.

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
---
 meta/classes-recipe/rust-target-config.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index 0c7e3c0090..c462478dae 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -406,7 +406,11 @@ def rust_gen_target(d, thing, wd, arch):
     if "powerpc64le" in tspec['llvm-target']:
         tspec['llvm-abiname'] = "elfv2"
     if "powerpc64" in tspec['llvm-target']:
-        tspec['llvm-abiname'] = "elfv1"
+        defaulttune = d.getVar('DEFAULTTUNE') or ''
+        if 'ppc64p9le' in defaulttune:
+            tspec['llvm-abiname'] = "elfv2"
+        else:
+            tspec['llvm-abiname'] = "elfv1"
     tspec['vendor'] = "unknown"
     tspec['target-family'] = "unix"
     tspec['linker'] = "{}{}gcc".format(d.getVar('CCACHE'), prefix)
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-28  5:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 16:15 [PATCH] rust-target-config: Set elfv2 ABI for powerpc64 when using ppc64p9le tune Deepesh.Varatharajan
2025-10-26 13:23 ` [OE-core] " Mathieu Dubois-Briand
2025-10-28  5:26   ` Deepesh Varatharajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox