Skip to content

Commit 9228de6

Browse files
laanwjalexcrichton
authored andcommitted
risc-v: Use medany model (#467)
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`.
1 parent 1d82f45 commit 9228de6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,7 @@ impl Build {
16031603
} else {
16041604
cmd.args.push("-mabi=ilp32".into());
16051605
}
1606+
cmd.args.push("-mcmodel=medany".into());
16061607
}
16071608
}
16081609
}

0 commit comments

Comments
 (0)