1 Bug: https://github.com/rust-lang/rust/issues/52108
2 --- a/src/bootstrap/bootstrap.py
3 +++ b/src/bootstrap/bootstrap.py
5 # preserve existing RUSTFLAGS
6 env.setdefault("RUSTFLAGS", "")
7 env["RUSTFLAGS"] += " -Cdebuginfo=2"
8 + if self.build_triple().startswith('mips'):
9 + env["RUSTFLAGS"] += " -Ctarget-feature=+xgot"
11 build_section = "target.{}".format(self.build_triple())
13 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs
14 +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs
16 endian: "big".to_string(),
17 // NOTE(mips64r2) matches C toolchain
18 cpu: "mips64r2".to_string(),
19 - features: "+mips64r2".to_string(),
20 + features: "+mips64r2,+xgot".to_string(),
21 max_atomic_width: Some(64),
22 mcount: "_mcount".to_string(),
24 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs
25 +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs
27 options: TargetOptions {
28 // NOTE(mips64r2) matches C toolchain
29 cpu: "mips64r2".to_string(),
30 - features: "+mips64r2".to_string(),
31 + features: "+mips64r2,+xgot".to_string(),
32 max_atomic_width: Some(64),
33 mcount: "_mcount".to_string(),