From ca42c25598b2d4f1842dc18af6992daea0b0fca9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 19 Nov 2019 15:29:43 +0000 Subject: [PATCH] [RISCV] Disable Atomics on all Non-A RISC-V targets --- src/librustc_target/spec/riscv32i_unknown_none_elf.rs | 2 +- src/librustc_target/spec/riscv32imc_unknown_none_elf.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/librustc_target/spec/riscv32i_unknown_none_elf.rs b/src/librustc_target/spec/riscv32i_unknown_none_elf.rs index 314778408f7e5..0db34196bdd61 100644 --- a/src/librustc_target/spec/riscv32i_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv32i_unknown_none_elf.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { linker: Some("rust-lld".to_string()), cpu: "generic-rv32".to_string(), - max_atomic_width: None, + max_atomic_width: Some(0), atomic_cas: false, features: String::new(), executables: true, diff --git a/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs b/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs index 647d33e3ffeee..621af5a1eca75 100644 --- a/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs @@ -17,8 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { linker: Some("rust-lld".to_string()), cpu: "generic-rv32".to_string(), - // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86005 - max_atomic_width: None, //Some(32), + max_atomic_width: Some(0), atomic_cas: false, features: "+m,+c".to_string(), executables: true,