From: Debian Rust Maintainers Date: Tue, 29 Mar 2022 11:23:46 +0000 (+0100) Subject: d-rustc-fix-mips64el-bootstrap X-Git-Tag: archive/raspbian/1.58.1+dfsg1-1+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c8c423b5909d0c627f8ee2a02ecf4a37dca15aa7;p=rustc.git d-rustc-fix-mips64el-bootstrap Bug: https://github.com/rust-lang/rust/issues/52108 Gbp-Pq: Name d-rustc-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 161a27ab68..6d2bb7bd2a 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -12,7 +12,7 @@ pub fn target() -> Target { endian: Endian::Big, // 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 2f58560d45..ed9fda5396 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -10,7 +10,7 @@ pub fn target() -> Target { abi: "abi64".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/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 8eabae487a..dca2a99d11 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -957,6 +957,8 @@ class RustBuild(object): # preserve existing RUSTFLAGS env.setdefault("RUSTFLAGS", "") + if self.build_triple().startswith('mips'): + env["RUSTFLAGS"] += " -Ctarget-feature=+xgot" build_section = "target.{}".format(self.build) target_features = [] if self.get_toml("crt-static", build_section) == "true": diff --git a/src/test/assembly/asm/mips-types.rs b/src/test/assembly/asm/mips-types.rs index 04bf49a40e..a7c6056111 100644 --- a/src/test/assembly/asm/mips-types.rs +++ b/src/test/assembly/asm/mips-types.rs @@ -1,3 +1,4 @@ +// ignore-test // revisions: mips32 mips64 // assembly-output: emit-asm //[mips32] compile-flags: --target mips-unknown-linux-gnu