Bug: https://github.com/rust-lang/rust/issues/52108
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
-@@ -791,6 +791,8 @@
+@@ -795,6 +795,8 @@
# preserve existing RUSTFLAGS
env.setdefault("RUSTFLAGS", "")
env["RUSTFLAGS"] += " -Cdebuginfo=2"
+ if self.build_triple().startswith('mips'):
+ env["RUSTFLAGS"] += " -Ctarget-feature=+xgot"
- build_section = "target.{}".format(self.build_triple())
+ build_section = "target.{}".format(self.build)
target_features = []
--- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs
+++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs