diff mbox series

[V4,1/3] rust-target-config: Update data layout x86,ppc,riscv64,aarch64,loongaarch64 targets.

Message ID 20250113133936.2968211-1-Deepesh.Varatharajan@windriver.com
State New
Headers show
Series [V4,1/3] rust-target-config: Update data layout x86,ppc,riscv64,aarch64,loongaarch64 targets. | expand

Commit Message

Deepesh Varatharajan Jan. 13, 2025, 1:39 p.m. UTC
From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

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

error: data-layout for target `x86_64-poky-linux-gnux32`,
`e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`,
differs from LLVM target's `x86_64-poky-linux-gnux32` default layout,
`e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
------------------------------------------------------------------------------------------

Rust commits for updating the data layouts:

x86:
https://github.com/rust-lang/rust/commit/dbff90c2a7c751cf9d6843cd585429beb100c17d
x86_64-x32:
https://github.com/rust-lang/rust/commit/ec55a05374d89d206be5140a4759af92f1b42f15
aarch64:
https://github.com/rust-lang/rust/commit/4d397d33da8aff64419a03694d152c8250916f19
ppc:
https://github.com/rust-lang/rust/commit/ad7ea8b7e690e6000006b6fde630a2c8c4385019
riscv64gc:
https://github.com/rust-lang/rust/commit/f414715ebfda201f91f80ef9f28d9923d614d1c4
loongaarch64:
https://github.com/rust-lang/rust/commit/4a06a5bc7ad259023e4373e794687adfce252dac

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

Comments

Alexander Kanavin Jan. 13, 2025, 1:51 p.m. UTC | #1
Hello,

when you send new patchset revisions, it helps to explain what changed
between revisions, especially when no feedback was given to the
previous revisions.

You can do this with cover letters, or by including a changelog in
commit messages under --- separator (so the changelog won't be
included in actual repo commits when patches are taken from the
mailing list by maintainers).

Alex


On Mon, 13 Jan 2025 at 14:40, Varatharajan, Deepesh via
lists.openembedded.org
<deepesh.varatharajan=windriver.com@lists.openembedded.org> wrote:
>
> From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
>
> -----------------------------------------------------------------------------------------
> 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`
>
> error: data-layout for target `x86_64-poky-linux-gnux32`,
> `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`,
> differs from LLVM target's `x86_64-poky-linux-gnux32` default layout,
> `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
> ------------------------------------------------------------------------------------------
>
> Rust commits for updating the data layouts:
>
> x86:
> https://github.com/rust-lang/rust/commit/dbff90c2a7c751cf9d6843cd585429beb100c17d
> x86_64-x32:
> https://github.com/rust-lang/rust/commit/ec55a05374d89d206be5140a4759af92f1b42f15
> aarch64:
> https://github.com/rust-lang/rust/commit/4d397d33da8aff64419a03694d152c8250916f19
> ppc:
> https://github.com/rust-lang/rust/commit/ad7ea8b7e690e6000006b6fde630a2c8c4385019
> riscv64gc:
> https://github.com/rust-lang/rust/commit/f414715ebfda201f91f80ef9f28d9923d614d1c4
> loongaarch64:
> https://github.com/rust-lang/rust/commit/4a06a5bc7ad259023e4373e794687adfce252dac
>
> Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
> ---
>  meta/classes-recipe/rust-target-config.bbclass | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
> index 399c13db26..67aaa56bac 100644
> --- a/meta/classes-recipe/rust-target-config.bbclass
> +++ b/meta/classes-recipe/rust-target-config.bbclass
> @@ -146,7 +146,7 @@ MAX_ATOMIC_WIDTH[armv7-eabi] = "64"
>  FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2"
>
>  ## aarch64-unknown-linux-{gnu, musl}
> -DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
> +DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
>  TARGET_ENDIAN[aarch64] = "little"
>  TARGET_POINTER_WIDTH[aarch64] = "64"
>  TARGET_C_INT_WIDTH[aarch64] = "32"
> @@ -160,21 +160,21 @@ TARGET_C_INT_WIDTH[x86_64] = "32"
>  MAX_ATOMIC_WIDTH[x86_64] = "64"
>
>  ## x86_64-unknown-linux-gnux32
> -DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
> +DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
>  TARGET_ENDIAN[x86_64-x32] = "little"
>  TARGET_POINTER_WIDTH[x86_64-x32] = "32"
>  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"
>  MAX_ATOMIC_WIDTH[i686] = "64"
>
>  ## XXX: a bit of a hack so qemux86 builds, clone of i686-unknown-linux-{gnu, musl} above
> -DATA_LAYOUT[i586] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
> +DATA_LAYOUT[i586] = "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[i586] = "little"
>  TARGET_POINTER_WIDTH[i586] = "32"
>  TARGET_C_INT_WIDTH[i586] = "32"
> @@ -216,21 +216,21 @@ 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"
>  MAX_ATOMIC_WIDTH[powerpc] = "32"
>
>  ## powerpc64-unknown-linux-{gnu, musl}
> -DATA_LAYOUT[powerpc64] = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
> +DATA_LAYOUT[powerpc64] = "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512"
>  TARGET_ENDIAN[powerpc64] = "big"
>  TARGET_POINTER_WIDTH[powerpc64] = "64"
>  TARGET_C_INT_WIDTH[powerpc64] = "32"
>  MAX_ATOMIC_WIDTH[powerpc64] = "64"
>
>  ## powerpc64le-unknown-linux-{gnu, musl}
> -DATA_LAYOUT[powerpc64le] = "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512"
> +DATA_LAYOUT[powerpc64le] = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
>  TARGET_ENDIAN[powerpc64le] = "little"
>  TARGET_POINTER_WIDTH[powerpc64le] = "64"
>  TARGET_C_INT_WIDTH[powerpc64le] = "32"
> @@ -244,14 +244,14 @@ TARGET_C_INT_WIDTH[riscv32gc] = "32"
>  MAX_ATOMIC_WIDTH[riscv32gc] = "32"
>
>  ## riscv64gc-unknown-linux-{gnu, musl}
> -DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
> +DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
>  TARGET_ENDIAN[riscv64gc] = "little"
>  TARGET_POINTER_WIDTH[riscv64gc] = "64"
>  TARGET_C_INT_WIDTH[riscv64gc] = "32"
>  MAX_ATOMIC_WIDTH[riscv64gc] = "64"
>
>  ## loongarch64-unknown-linux-{gnu, musl}
> -DATA_LAYOUT[loongarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
> +DATA_LAYOUT[loongarch64] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
>  TARGET_ENDIAN[loongarch64] = "little"
>  TARGET_POINTER_WIDTH[loongarch64] = "64"
>  TARGET_C_INT_WIDTH[loongarch64] = "32"
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#209721): https://lists.openembedded.org/g/openembedded-core/message/209721
> Mute This Topic: https://lists.openembedded.org/mt/110586460/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Deepesh Varatharajan Jan. 13, 2025, 2:07 p.m. UTC | #2
On 13-01-2025 19:21, Alexander Kanavin wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Hello,
>
> when you send new patchset revisions, it helps to explain what changed
> between revisions, especially when no feedback was given to the
> previous revisions.
>
> You can do this with cover letters, or by including a changelog in
> commit messages under --- separator (so the changelog won't be
> included in actual repo commits when patches are taken from the
> mailing list by maintainers).
>
> Alex
>
Hello All,

Testing patch 
|/home/patchtest/share/mboxes/V3-1-3-rust-target-config-Update-the-data-layout-for-x86-ppc-riscv64-aarch64-and-loongaarch64-targets..patch|, 
the following test failed:

*FAIL:* Test for shortlog length: The commit message exceeded 90 
characters per line (currently 102 characters), 
(|test_mbox.TestMbox.test_shortlog_length|)

To address the above issue in the V3 patch from patchtest, I updated the 
commit message to ensure each line is less than 90 characters and have 
now submitted V4.

Regards,
Deepesh

>
>
> On Mon, 13 Jan 2025 at 14:40, Varatharajan, Deepesh via
> lists.openembedded.org
> <deepesh.varatharajan=windriver.com@lists.openembedded.org> wrote:
>> From: Deepesh Varatharajan<Deepesh.Varatharajan@windriver.com>
>>
>> -----------------------------------------------------------------------------------------
>> 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`
>>
>> error: data-layout for target `x86_64-poky-linux-gnux32`,
>> `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`,
>> differs from LLVM target's `x86_64-poky-linux-gnux32` default layout,
>> `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
>> ------------------------------------------------------------------------------------------
>>
>> Rust commits for updating the data layouts:
>>
>> x86:
>> https://github.com/rust-lang/rust/commit/dbff90c2a7c751cf9d6843cd585429beb100c17d
>> x86_64-x32:
>> https://github.com/rust-lang/rust/commit/ec55a05374d89d206be5140a4759af92f1b42f15
>> aarch64:
>> https://github.com/rust-lang/rust/commit/4d397d33da8aff64419a03694d152c8250916f19
>> ppc:
>> https://github.com/rust-lang/rust/commit/ad7ea8b7e690e6000006b6fde630a2c8c4385019
>> riscv64gc:
>> https://github.com/rust-lang/rust/commit/f414715ebfda201f91f80ef9f28d9923d614d1c4
>> loongaarch64:
>> https://github.com/rust-lang/rust/commit/4a06a5bc7ad259023e4373e794687adfce252dac
>>
>> Signed-off-by: Deepesh Varatharajan<Deepesh.Varatharajan@windriver.com>
>> ---
>>   meta/classes-recipe/rust-target-config.bbclass | 18 +++++++++---------
>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
>> index 399c13db26..67aaa56bac 100644
>> --- a/meta/classes-recipe/rust-target-config.bbclass
>> +++ b/meta/classes-recipe/rust-target-config.bbclass
>> @@ -146,7 +146,7 @@ MAX_ATOMIC_WIDTH[armv7-eabi] = "64"
>>   FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2"
>>
>>   ## aarch64-unknown-linux-{gnu, musl}
>> -DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
>> +DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
>>   TARGET_ENDIAN[aarch64] = "little"
>>   TARGET_POINTER_WIDTH[aarch64] = "64"
>>   TARGET_C_INT_WIDTH[aarch64] = "32"
>> @@ -160,21 +160,21 @@ TARGET_C_INT_WIDTH[x86_64] = "32"
>>   MAX_ATOMIC_WIDTH[x86_64] = "64"
>>
>>   ## x86_64-unknown-linux-gnux32
>> -DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
>> +DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
>>   TARGET_ENDIAN[x86_64-x32] = "little"
>>   TARGET_POINTER_WIDTH[x86_64-x32] = "32"
>>   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"
>>   MAX_ATOMIC_WIDTH[i686] = "64"
>>
>>   ## XXX: a bit of a hack so qemux86 builds, clone of i686-unknown-linux-{gnu, musl} above
>> -DATA_LAYOUT[i586] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
>> +DATA_LAYOUT[i586] = "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[i586] = "little"
>>   TARGET_POINTER_WIDTH[i586] = "32"
>>   TARGET_C_INT_WIDTH[i586] = "32"
>> @@ -216,21 +216,21 @@ 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"
>>   MAX_ATOMIC_WIDTH[powerpc] = "32"
>>
>>   ## powerpc64-unknown-linux-{gnu, musl}
>> -DATA_LAYOUT[powerpc64] = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
>> +DATA_LAYOUT[powerpc64] = "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512"
>>   TARGET_ENDIAN[powerpc64] = "big"
>>   TARGET_POINTER_WIDTH[powerpc64] = "64"
>>   TARGET_C_INT_WIDTH[powerpc64] = "32"
>>   MAX_ATOMIC_WIDTH[powerpc64] = "64"
>>
>>   ## powerpc64le-unknown-linux-{gnu, musl}
>> -DATA_LAYOUT[powerpc64le] = "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512"
>> +DATA_LAYOUT[powerpc64le] = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
>>   TARGET_ENDIAN[powerpc64le] = "little"
>>   TARGET_POINTER_WIDTH[powerpc64le] = "64"
>>   TARGET_C_INT_WIDTH[powerpc64le] = "32"
>> @@ -244,14 +244,14 @@ TARGET_C_INT_WIDTH[riscv32gc] = "32"
>>   MAX_ATOMIC_WIDTH[riscv32gc] = "32"
>>
>>   ## riscv64gc-unknown-linux-{gnu, musl}
>> -DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
>> +DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
>>   TARGET_ENDIAN[riscv64gc] = "little"
>>   TARGET_POINTER_WIDTH[riscv64gc] = "64"
>>   TARGET_C_INT_WIDTH[riscv64gc] = "32"
>>   MAX_ATOMIC_WIDTH[riscv64gc] = "64"
>>
>>   ## loongarch64-unknown-linux-{gnu, musl}
>> -DATA_LAYOUT[loongarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
>> +DATA_LAYOUT[loongarch64] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
>>   TARGET_ENDIAN[loongarch64] = "little"
>>   TARGET_POINTER_WIDTH[loongarch64] = "64"
>>   TARGET_C_INT_WIDTH[loongarch64] = "32"
>> --
>> 2.43.0
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#209721):https://lists.openembedded.org/g/openembedded-core/message/209721
>> Mute This Topic:https://lists.openembedded.org/mt/110586460/1686489
>> Group Owner:openembedded-core+owner@lists.openembedded.org
>> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Alexander Kanavin Jan. 13, 2025, 3:46 p.m. UTC | #3
On Mon, 13 Jan 2025 at 15:08, Deepesh Varatharajan
<deepesh.varatharajan@windriver.com> wrote:
> Testing patch /home/patchtest/share/mboxes/V3-1-3-rust-target-config-Update-the-data-layout-for-x86-ppc-riscv64-aarch64-and-loongaarch64-targets..patch, the following test failed:
>
> FAIL: Test for shortlog length: The commit message exceeded 90 characters per line (currently 102 characters), (test_mbox.TestMbox.test_shortlog_length)
>
> To address the above issue in the V3 patch from patchtest, I updated the commit message to ensure each line is less than 90 characters and have now submitted V4.

I want to note that the 90 character check is not a hard requirement,
but a guideline. If you feel that a longer message is better and more
informative, then keep it, as long as it's not excessively long.

Alex
diff mbox series

Patch

diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index 399c13db26..67aaa56bac 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -146,7 +146,7 @@  MAX_ATOMIC_WIDTH[armv7-eabi] = "64"
 FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2"
 
 ## aarch64-unknown-linux-{gnu, musl}
-DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
 TARGET_ENDIAN[aarch64] = "little"
 TARGET_POINTER_WIDTH[aarch64] = "64"
 TARGET_C_INT_WIDTH[aarch64] = "32"
@@ -160,21 +160,21 @@  TARGET_C_INT_WIDTH[x86_64] = "32"
 MAX_ATOMIC_WIDTH[x86_64] = "64"
 
 ## x86_64-unknown-linux-gnux32
-DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
 TARGET_ENDIAN[x86_64-x32] = "little"
 TARGET_POINTER_WIDTH[x86_64-x32] = "32"
 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"
 MAX_ATOMIC_WIDTH[i686] = "64"
 
 ## XXX: a bit of a hack so qemux86 builds, clone of i686-unknown-linux-{gnu, musl} above
-DATA_LAYOUT[i586] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
+DATA_LAYOUT[i586] = "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[i586] = "little"
 TARGET_POINTER_WIDTH[i586] = "32"
 TARGET_C_INT_WIDTH[i586] = "32"
@@ -216,21 +216,21 @@  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"
 MAX_ATOMIC_WIDTH[powerpc] = "32"
 
 ## powerpc64-unknown-linux-{gnu, musl}
-DATA_LAYOUT[powerpc64] = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
+DATA_LAYOUT[powerpc64] = "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512"
 TARGET_ENDIAN[powerpc64] = "big"
 TARGET_POINTER_WIDTH[powerpc64] = "64"
 TARGET_C_INT_WIDTH[powerpc64] = "32"
 MAX_ATOMIC_WIDTH[powerpc64] = "64"
 
 ## powerpc64le-unknown-linux-{gnu, musl}
-DATA_LAYOUT[powerpc64le] = "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512"
+DATA_LAYOUT[powerpc64le] = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
 TARGET_ENDIAN[powerpc64le] = "little"
 TARGET_POINTER_WIDTH[powerpc64le] = "64"
 TARGET_C_INT_WIDTH[powerpc64le] = "32"
@@ -244,14 +244,14 @@  TARGET_C_INT_WIDTH[riscv32gc] = "32"
 MAX_ATOMIC_WIDTH[riscv32gc] = "32"
 
 ## riscv64gc-unknown-linux-{gnu, musl}
-DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
+DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
 TARGET_ENDIAN[riscv64gc] = "little"
 TARGET_POINTER_WIDTH[riscv64gc] = "64"
 TARGET_C_INT_WIDTH[riscv64gc] = "32"
 MAX_ATOMIC_WIDTH[riscv64gc] = "64"
 
 ## loongarch64-unknown-linux-{gnu, musl}
-DATA_LAYOUT[loongarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+DATA_LAYOUT[loongarch64] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
 TARGET_ENDIAN[loongarch64] = "little"
 TARGET_POINTER_WIDTH[loongarch64] = "64"
 TARGET_C_INT_WIDTH[loongarch64] = "32"