From d2757965ec10da4df31d2230769ea4263cfeb57f Mon Sep 17 00:00:00 2001 From: he32 Date: Thu, 20 Jul 2023 16:25:04 +0200 Subject: [PATCH] Use correct ABI on NetBSD/riscv64, and add target entry for same. (#815) --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 412dc070..1cc340d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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()); @@ -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"),