diff options
| author | Havard Eidnes <he@NetBSD.org> | 2023-10-26 17:10:16 +0000 |
|---|---|---|
| committer | Havard Eidnes <he@NetBSD.org> | 2023-10-26 17:10:16 +0000 |
| commit | 391b472a370a5d35c43bd0a26182076cf0c17ca9 (patch) | |
| tree | 83864695d8d57d45f5989c7b58e96d978f71b6b9 /compiler/rustc_llvm/build.rs | |
| parent | 6642b4b1e2f2edec71cdf3fabef8fcdc8b8517a7 (diff) | |
| download | rust-391b472a370a5d35c43bd0a26182076cf0c17ca9.tar.gz rust-391b472a370a5d35c43bd0a26182076cf0c17ca9.zip | |
rustc_llvm/build.rs: improve comment for NetBSD/i386 targets
...explaining why we need -latomic (gcc & g++ built for i486, and LLVM insisting on use of 64-bit atomics).
Diffstat (limited to 'compiler/rustc_llvm/build.rs')
| -rw-r--r-- | compiler/rustc_llvm/build.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs index acb1d9607a4..e4412132136 100644 --- a/compiler/rustc_llvm/build.rs +++ b/compiler/rustc_llvm/build.rs @@ -258,7 +258,9 @@ fn main() { { println!("cargo:rustc-link-lib=z"); } else if target.contains("netbsd") { - // Building for i586 or i686, we need -latomic for 64-bit atomics + // On NetBSD/i386, gcc and g++ is built for i486 (to maximize backward compat) + // However, LLVM insists on using 64-bit atomics. + // This gives rise to a need to link rust itself with -latomic for these targets if target.starts_with("i586") || target.starts_with("i686") { |
