Skip to content

Commit

Permalink
rust-target-config: Update data layouts for 32-bit arm targets
Browse files Browse the repository at this point in the history
update the rust data layout to sync with LLVM [1]
fixes the following build
error:

error: data-layout for target `arm-poky-linux-gnueabi`, `e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64`, differs from LLVM target's `armv7-unknown-linux-gnueabihf` default layout, `e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64`

meta-rust issue report with rust 1.76 [2]

[1] llvm/llvm-project@308e82e
[2]: meta-rust/meta-rust#444

(From OE-Core rev: 145194fc3f50e254723bf4c115c595eacb42ce39)

Signed-off-by: Tronje Krabbe <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
tronje authored and alexandrebelloni committed Jun 26, 2024
1 parent 2d8c13a commit 9b9633b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meta/classes-recipe/rust-target-config.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ def llvm_features(d):
llvm_features[vardepvalue] = "${@llvm_features(d)}"

## arm-unknown-linux-gnueabihf
DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
TARGET_ENDIAN[arm-eabi] = "little"
TARGET_POINTER_WIDTH[arm-eabi] = "32"
TARGET_C_INT_WIDTH[arm-eabi] = "32"
MAX_ATOMIC_WIDTH[arm-eabi] = "64"
FEATURES[arm-eabi] = "+v6,+vfp2"

## armv7-unknown-linux-gnueabihf
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
TARGET_ENDIAN[armv7-eabi] = "little"
TARGET_POINTER_WIDTH[armv7-eabi] = "32"
TARGET_C_INT_WIDTH[armv7-eabi] = "32"
Expand Down

0 comments on commit 9b9633b

Please sign in to comment.