1
Fork 0

Explain why libatomic is not needed on FreeBSD riscv64

From Jessica Clarke (jrtc27@)
This commit is contained in:
Tobias Kortkamp 2021-12-03 18:48:53 +01:00
parent 47474f1055
commit e24045e587
No known key found for this signature in database
GPG key ID: F4815C5F893E655D
2 changed files with 11 additions and 3 deletions

View file

@ -276,7 +276,10 @@ fn main() {
"stdc++"
};
// RISC-V requires libatomic for sub-word atomic operations
// RISC-V GCC erroneously requires libatomic for sub-word
// atomic operations. FreeBSD uses Clang as its system
// compiler and provides no libatomic in its base system so
// does not want this.
if !target.contains("freebsd") && target.starts_with("riscv") {
println!("cargo:rustc-link-lib=atomic");
}