d-fix-mips64el-bootstrap
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 18 Sep 2021 10:45:21 +0000 (11:45 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 18 Sep 2021 10:45:21 +0000 (11:45 +0100)
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
compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs
src/bootstrap/bootstrap.py

index daa0d9da1725e6cabc2c5b15ae05d5df1a450272..f192ba106a42bb564c3c4fec32780251e23c3a75 100644 (file)
@@ -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(),
 
index d767705b0459b38c8b6c9c1a0c7d6359042deb4c..4fe79a598173c0be578fd89076f516f41914beba 100644 (file)
@@ -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(),
 
index 0ff7d4d8629e65e56d7e37271263e62db2e6dbbb..72559131ce547ba2ecc725e6ad40f6791498bca2 100644 (file)
@@ -795,6 +795,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)
         target_features = []