Skip to content

Commit 9ae4ef9

Browse files
committed
targets: Fix max-atomic-width target setting
Nightly rustc throws compiler errors since upstream commit 3be40b22c834 ("Fix AtomicPtr::from_mut align check: Avoid generic arg in const expr.") [1]. They seem to be related to some discrepancies in the alignment requirements for pointer types on AVR. While this should probably be investigated at some point, for now let's set `max-atomic-width` to 8 to make everything build again but still retain at least some atomic types (those aren't actual atomics but intrinsics that are lowered to critical sections for atomic access). [1]: rust-lang/rust@3be40b2 Signed-off-by: Rahix <[email protected]>
1 parent ad6fedd commit 9ae4ef9

File tree

8 files changed

+10
-0
lines changed

8 files changed

+10
-0
lines changed

chips/atmega1280-hal/avr-atmega1280.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
13+
1214
"executables": true,
1315
"linker": "avr-gcc",
1416
"linker-flavor": "gcc",

chips/atmega168-hal/avr-atmega168.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
1213

1314
"executables": true,
1415

chips/atmega2560-hal/avr-atmega2560.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
13+
1214
"executables": true,
1315
"linker": "avr-gcc",
1416
"linker-flavor": "gcc",

chips/atmega328p-hal/avr-atmega328p.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
1213

1314
"executables": true,
1415

chips/atmega32u4-hal/avr-atmega32u4.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
1213

1314
"executables": true,
1415

chips/atmega48p-hal/avr-atmega48p.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
1213

1314
"executables": true,
1415

chips/attiny85-hal/avr-attiny85.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
1213

1314
"executables": true,
1415

chips/attiny88-hal/avr-attiny88.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"target-vendor": "unknown",
1010
"arch": "avr",
1111
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
12+
"max-atomic-width": 8,
1213

1314
"executables": true,
1415

0 commit comments

Comments
 (0)