diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-07 16:47:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-07 16:47:56 +0200 |
| commit | 9b1f9433db95f1c5e02c0030e6ab8ac37ea6dbca (patch) | |
| tree | b95212867cf15ec6492a6742ab6cd41c0723f087 | |
| parent | b0a5126f068e954ebe8164d8b7bf3c533f747bff (diff) | |
| parent | 4d4df889347cca380d1279a1d42d8925ab626786 (diff) | |
| download | rust-9b1f9433db95f1c5e02c0030e6ab8ac37ea6dbca.tar.gz rust-9b1f9433db95f1c5e02c0030e6ab8ac37ea6dbca.zip | |
Rollup merge of #114496 - taiki-e:sparc32-atomic, r=Amanieu
Set max_atomic_width for sparc-unknown-linux-gnu to 32 This is currently set to 64 https://github.com/rust-lang/rust/blob/90f0b24ad3e7fc0dc0e419c9da30d74629cd5736/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs#L8 However, AFAIK, this architecture doesn't support 64-bit atomics, and LLVM generates libcalls: https://godbolt.org/z/chzThWGG1 (Currently, attempts to run `cargo test` for this target result in "undefined reference to `__sync_val_compare_and_swap_8'" error. https://github.com/taiki-e/rust-cross-toolchain/commit/02efe1e74f2280f06662eaf275690883b2f9c7ae) r? `@Amanieu`
| -rw-r--r-- | compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index 12968abda08..b10e6264b73 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -5,7 +5,7 @@ pub fn target() -> Target { let mut base = super::linux_gnu_base::opts(); base.endian = Endian::Big; base.cpu = "v9".into(); - base.max_atomic_width = Some(64); + base.max_atomic_width = Some(32); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mv8plus"]); Target { |
