Skip to content

Commit 391b472

Browse files
committed
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).
1 parent 6642b4b commit 391b472

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_llvm/build.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ fn main() {
258258
{
259259
println!("cargo:rustc-link-lib=z");
260260
} else if target.contains("netbsd") {
261-
// Building for i586 or i686, we need -latomic for 64-bit atomics
261+
// On NetBSD/i386, gcc and g++ is built for i486 (to maximize backward compat)
262+
// However, LLVM insists on using 64-bit atomics.
263+
// This gives rise to a need to link rust itself with -latomic for these targets
262264
if target.starts_with("i586")
263265
|| target.starts_with("i686")
264266
{

0 commit comments

Comments
 (0)