Browse Source

Default to double-float ABI on RISC-V Linux (#460)

master
msizanoen1 5 years ago
committed by Alex Crichton
parent
commit
15fe24ae6f
  1. 8
      src/lib.rs

8
src/lib.rs

@ -1588,9 +1588,11 @@ impl Build {
if let Some(arch) = parts.next() { if let Some(arch) = parts.next() {
let arch = &arch[5..]; let arch = &arch[5..];
cmd.args.push(("-march=rv".to_owned() + arch).into()); cmd.args.push(("-march=rv".to_owned() + arch).into());
// ABI is always soft-float right now, update this when this is no longer the if target.contains("linux") && arch.starts_with("64") {
// case: cmd.args.push("-mabi=lp64d".into());
if arch.starts_with("64") { } else if target.contains("linux") && arch.starts_with("32") {
cmd.args.push("-mabi=ilp32d".into());
} else if arch.starts_with("64") {
cmd.args.push("-mabi=lp64".into()); cmd.args.push("-mabi=lp64".into());
} else { } else {
cmd.args.push("-mabi=ilp32".into()); cmd.args.push("-mabi=ilp32".into());

Loading…
Cancel
Save