Skip to content

Commit

Permalink
Pass +atomics-32 feature for {arm,thumb}v4t-none-eabi
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 16, 2022
1 parent 8556e66 commit 8439080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion compiler/rustc_target/src/spec/armv4t_none_eabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Ld,
linker: Some("arm-none-eabi-ld".into()),
asm_args: cvs!["-mthumb-interwork", "-march=armv4t", "-mlittle-endian",],
features: "+soft-float,+strict-align".into(),
// Force-enable 32-bit atomics, which allows the use of atomic load/store only.
// The resulting atomics are ABI incompatible with atomics backed by libatomic.
features: "+soft-float,+strict-align,+atomics-32".into(),
main_needs_argc_argv: false,
atomic_cas: false,
has_thumb_interworking: true,
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ pub fn target() -> Target {
asm_args: cvs!["-mthumb-interwork", "-march=armv4t", "-mlittle-endian",],

// minimum extra features, these cannot be disabled via -C
features: "+soft-float,+strict-align".into(),
// Also force-enable 32-bit atomics, which allows the use of atomic load/store only.
// The resulting atomics are ABI incompatible with atomics backed by libatomic.
features: "+soft-float,+strict-align,+atomics-32".into(),

panic_strategy: PanicStrategy::Abort,
relocation_model: RelocModel::Static,
Expand Down

0 comments on commit 8439080

Please sign in to comment.