Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V2 1/3] rust-target-config: Update the data layout for x86 and ppc targets.
@ 2025-01-09  9:25 Deepesh.Varatharajan
  2025-01-09  9:25 ` [PATCH V2 2/3] rust: Fix for duplicate libstd.so Deepesh.Varatharajan
  2025-01-09  9:25 ` [PATCH V2 3/3] rust: Upgrade 1.80.1->1.81.0 Deepesh.Varatharajan
  0 siblings, 2 replies; 8+ messages in thread
From: Deepesh.Varatharajan @ 2025-01-09  9:25 UTC (permalink / raw)
  To: openembedded-core
  Cc: Sundeep.Kokkonda, Shivaprasad.Moodalappa, Deepesh.Varatharajan

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

The data layout for x86 and ppc targets were different in rust from llvm.

-----------------------------------------------------------------------------------------
error: data-layout for target `x86-linux`, `e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128`,
differs from LLVM target's `i686-unknown-linux-gnu` default layout,
`e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128`

error: data-layout for target `powerpc-linux`, `E-m:e-p:32:32-i64:64-n32`,
differs from LLVM target's `powerpc-unknown-linux-gnu` default layout,
`E-m:e-p:32:32-Fn32-i64:64-n32`
-------------------------------------------------------------------------------------------

Rust commits for updating the data layouts:

x86: https://github.com/rust-lang/rust/commit/dbff90c2a7c751cf9d6843cd585429beb100c17d
ppc: https://github.com/rust-lang/rust/commit/ad7ea8b7e690e6000006b6fde630a2c8c4385019

Hence, the data layout for x86 and ppc are modified as per the llvm sources which fixes the issue.

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

diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index 399c13db26..7518e5bc01 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -167,7 +167,7 @@ TARGET_C_INT_WIDTH[x86_64-x32] = "32"
 MAX_ATOMIC_WIDTH[x86_64-x32] = "64"
 
 ## i686-unknown-linux-{gnu, musl}
-DATA_LAYOUT[i686] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
+DATA_LAYOUT[i686] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128"
 TARGET_ENDIAN[i686] = "little"
 TARGET_POINTER_WIDTH[i686] = "32"
 TARGET_C_INT_WIDTH[i686] = "32"
@@ -216,7 +216,7 @@ TARGET_C_INT_WIDTH[mips64el] = "32"
 MAX_ATOMIC_WIDTH[mips64el] = "64"
 
 ## powerpc-unknown-linux-{gnu, musl}
-DATA_LAYOUT[powerpc] = "E-m:e-p:32:32-i64:64-n32"
+DATA_LAYOUT[powerpc] = "E-m:e-p:32:32-Fn32-i64:64-n32"
 TARGET_ENDIAN[powerpc] = "big"
 TARGET_POINTER_WIDTH[powerpc] = "32"
 TARGET_C_INT_WIDTH[powerpc] = "32"
-- 
2.43.0



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

end of thread, other threads:[~2025-01-10  4:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09  9:25 [PATCH V2 1/3] rust-target-config: Update the data layout for x86 and ppc targets Deepesh.Varatharajan
2025-01-09  9:25 ` [PATCH V2 2/3] rust: Fix for duplicate libstd.so Deepesh.Varatharajan
2025-01-09  9:25 ` [PATCH V2 3/3] rust: Upgrade 1.80.1->1.81.0 Deepesh.Varatharajan
2025-01-09  9:31   ` Varatharajan, Deepesh
2025-01-09  9:39     ` [OE-core] " Alexander Kanavin
2025-01-09 10:03       ` Deepesh Varatharajan
2025-01-09 13:41   ` Richard Purdie
2025-01-10  4:56     ` Deepesh Varatharajan

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