1
Fork 0

add riscv64gc-unknown-openbsd support (target riscv64-unknown-openbsd on OpenBSD)

- add platform-support documentation
- add riscv64gc-unknown-openbsd spec
- do not try to link with -latomic on openbsd
This commit is contained in:
Sébastien Marie 2022-08-28 05:22:21 +00:00
parent dacb6ee7b0
commit 1de5b22678
6 changed files with 26 additions and 4 deletions

View file

@ -342,10 +342,10 @@ fn main() {
};
// RISC-V GCC erroneously requires libatomic for sub-word
// atomic operations. FreeBSD uses Clang as its system
// atomic operations. Some BSD 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") {
if target.starts_with("riscv") && !target.contains("freebsd") && !target.contains("openbsd") {
println!("cargo:rustc-link-lib=atomic");
}