From 00fd818e01135d87d5456276493af533ea1dcca7 Mon Sep 17 00:00:00 2001 From: Debian Rust Maintainers Date: Sun, 20 Dec 2020 18:52:10 +0000 Subject: [PATCH] d-fix-mips64el-bootstrap Bug: https://github.com/rust-lang/rust/issues/52108 Gbp-Pq: Name d-fix-mips64el-bootstrap.patch --- compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs | 2 +- .../rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs | 2 +- src/bootstrap/bootstrap.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) 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 b2ea8a6f38..8b400d3bd3 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -15,7 +15,7 @@ pub fn target() -> TargetResult { 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), target_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 48aea4a39b..edb7251347 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -15,7 +15,7 @@ pub fn target() -> TargetResult { 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), target_mcount: "_mcount".to_string(), diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index c263759025..714595c943 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -793,6 +793,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 = [] -- 2.30.2