diff mbox series

[1/3] rust-target-config: Update the data layout for x86 and ppc targets.

Message ID 20241227065337.1257972-1-Deepesh.Varatharajan@windriver.com
State New
Headers show
Series [1/3] rust-target-config: Update the data layout for x86 and ppc targets. | expand

Commit Message

Varatharajan, Deepesh Dec. 27, 2024, 6:53 a.m. UTC
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

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

Comments

Khem Raj Dec. 27, 2024, 6:30 p.m. UTC | #1
On Thu, Dec 26, 2024 at 10:54 PM Varatharajan, Deepesh via
lists.openembedded.org <deepesh.varatharajan=
windriver.com@lists.openembedded.org> wrote:

> 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
>

LGTM


> 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#209094):
> https://lists.openembedded.org/g/openembedded-core/message/209094
> Mute This Topic: https://lists.openembedded.org/mt/110301946/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

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"