Skip to content

Commit

Permalink
risc-v: Use medany model (#467)
Browse files Browse the repository at this point in the history
With rust-lang/rust#62281, rust compiles in mcmodel=medium mode
which is equivalent to GCC medany. This prevents linker relocation
errors code is placed outside the range `-0x80000000..0x7ffffffff`.
  • Loading branch information
laanwj authored and alexcrichton committed Jan 21, 2020
1 parent 1d82f45 commit 9228de6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,7 @@ impl Build {
} else {
cmd.args.push("-mabi=ilp32".into());
}
cmd.args.push("-mcmodel=medany".into());
}
}
}
Expand Down

0 comments on commit 9228de6

Please sign in to comment.