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
+@@ -10,7 +10,7 @@
+ endian: "big".to_string(),
+ // NOTE(mips64r2) matches C toolchain
+ cpu: "mips64r2".to_string(),
+- features: "+mips64r2".to_string(),
++ features: "+mips64r2,+xgot".to_string(),
+ max_atomic_width: Some(64),
+ mcount: "_mcount".to_string(),
+
+--- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs
++++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs
+@@ -9,7 +9,7 @@
+ options: TargetOptions {
+ // NOTE(mips64r2) matches C toolchain
+ cpu: "mips64r2".to_string(),
+- features: "+mips64r2".to_string(),
++ features: "+mips64r2,+xgot".to_string(),
+ max_atomic_width: Some(64),
+ mcount: "_mcount".to_string(),
+