From: Debian Rust Maintainers Date: Sat, 28 Aug 2021 09:48:11 +0000 (+0100) Subject: d-fix-mips64el-bootstrap X-Git-Tag: archive/raspbian/1.49.0+dfsg1-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3939ad12d5181f5cf946b139e2dbd98c54239da9;p=rustc.git d-fix-mips64el-bootstrap Bug: https://github.com/rust-lang/rust/issues/52108 Gbp-Pq: Name d-fix-mips64el-bootstrap.patch --- diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index daa0d9da17..f192ba106a 100644 --- 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 @@ pub fn target() -> Target { 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(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index d767705b04..4fe79a5981 100644 --- 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 @@ pub fn target() -> Target { 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(), diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 8a216df433..b68b5841b1 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -791,6 +791,8 @@ class RustBuild(object): # 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()) target_features = []