Skip to content

Commit

Permalink
Use correct ABI on NetBSD/riscv64, and add target entry for same. (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
he32 authored Jul 20, 2023
1 parent 9042a84 commit d275796
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,9 @@ impl Build {
} else if target.contains("freebsd") && arch.starts_with("64") {
cmd.args.push(("-march=rv64gc").into());
cmd.args.push("-mabi=lp64d".into());
} else if target.contains("netbsd") && arch.starts_with("64") {
cmd.args.push(("-march=rv64gc").into());
cmd.args.push("-mabi=lp64d".into());
} else if target.contains("openbsd") && arch.starts_with("64") {
cmd.args.push(("-march=rv64gc").into());
cmd.args.push("-mabi=lp64d".into());
Expand Down Expand Up @@ -2992,6 +2995,7 @@ impl Build {
"riscv32gc-unknown-linux-gnu" => Some("riscv32-linux-gnu"),
"riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
"riscv32gc-unknown-linux-musl" => Some("riscv32-linux-musl"),
"riscv64gc-unknown-netbsd" => Some("riscv64--netbsd"),
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
"sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
Expand Down

0 comments on commit d275796

Please sign in to comment.