Skip to content

Commit ea1210e

Browse files
Fix some error on mips.
1 parent 0c15adc commit ea1210e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/bootstrap/bootstrap.py

+4
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,10 @@ def build_bootstrap(self):
695695
if self.get_toml("deny-warnings", "rust") != "false":
696696
env["RUSTFLAGS"] += " -Dwarnings"
697697

698+
# Fix hit the limit of 8K GOT entries per single object file
699+
if self.build_triple().startswith('mips'):
700+
env["RUSTFLAGS"] += " -Cllvm-args=-mxgot"
701+
698702
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
699703
os.pathsep + env["PATH"]
700704
if not os.path.isfile(self.cargo()):

src/libstd/sys/unix/rand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ mod imp {
5252
let err = errno() as libc::c_int;
5353
if err == libc::EINTR {
5454
continue;
55-
} else if err == libc::ENOSYS || err == libc::EPERM {
55+
} else if err == libc::ENOSYS || err == libc::EPERM || err == libc::EINVAL {
5656
// Fall back to reading /dev/urandom if `getrandom` is not
5757
// supported on the current kernel.
5858
//

0 commit comments

Comments
 (0)