From: Debian Rust Maintainers Date: Tue, 8 Mar 2022 10:51:18 +0000 (+0000) Subject: d-rustc-fix-mips64el-bootstrap X-Git-Tag: archive/raspbian/1.59.0+dfsg1-1_deb11u3+rpi1~1^2^2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c510f90fc21f75754ba443e7dd8d8608e3a8b407;p=rustc-mozilla.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 161a27ab6..6d2bb7bd2 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 2f58560d4..ed9fda539 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 45f75fcca..2cee9899b 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -936,6 +936,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 9ec7ba83c..ef649a6e9 100644 --- a/src/test/assembly/asm/mips-types.rs +++ b/src/test/assembly/asm/mips-types.rs @@ -1,3 +1,4 @@ +// ignore-test // min-llvm-version: 10.0.1 // revisions: mips32 mips64 // assembly-output: emit-asm