Skip to content

Commit 8683366

Browse files
committed
bootstrap: Link against libatomic on 32-bit SPARC
While at it, order the list of architectures alphabetically.
1 parent dc8ac3e commit 8683366

File tree

1 file changed

+4
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+4
-3
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -407,18 +407,19 @@ impl Step for Llvm {
407407
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
408408
}
409409

410-
if (target.starts_with("riscv") || target.starts_with("csky"))
410+
if (target.starts_with("csky") || target.starts_with("riscv") || target.starts_with("sparc-"))
411411
&& !target.contains("freebsd")
412412
&& !target.contains("openbsd")
413413
&& !target.contains("netbsd")
414414
{
415-
// RISC-V and CSKY GCC erroneously requires linking against
415+
// CSKY and RISC-V GCC erroneously requires linking against
416416
// `libatomic` when using 1-byte and 2-byte C++
417417
// atomics but the LLVM build system check cannot
418418
// detect this. Therefore it is set manually here.
419419
// Some BSD uses Clang as its system compiler and
420420
// provides no libatomic in its base system so does
421-
// not want this.
421+
// not want this. 32-bit SPARC requires linking against
422+
// libatomic as well.
422423
ldflags.exe.push(" -latomic");
423424
ldflags.shared.push(" -latomic");
424425
}

0 commit comments

Comments
 (0)