diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 50e1726240fff..e98352d5267a9 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -695,6 +695,10 @@ def build_bootstrap(self): if self.get_toml("deny-warnings", "rust") != "false": env["RUSTFLAGS"] += " -Dwarnings" + # Fix hit the limit of 8K GOT entries per single object file + if self.build_triple().startswith('mips'): + env["RUSTFLAGS"] += " -Cllvm-args=-mxgot" + env["PATH"] = os.path.join(self.bin_root(), "bin") + \ os.pathsep + env["PATH"] if not os.path.isfile(self.cargo()): diff --git a/src/libstd/sys/unix/rand.rs b/src/libstd/sys/unix/rand.rs index 9ce5f3d014cc1..52e57c41426c3 100644 --- a/src/libstd/sys/unix/rand.rs +++ b/src/libstd/sys/unix/rand.rs @@ -52,7 +52,7 @@ mod imp { let err = errno() as libc::c_int; if err == libc::EINTR { continue; - } else if err == libc::ENOSYS || err == libc::EPERM { + } else if err == libc::ENOSYS || err == libc::EPERM || err == libc::EINVAL { // Fall back to reading /dev/urandom if `getrandom` is not // supported on the current kernel. //