d-fix-mips64el-bootstrap
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Fri, 19 Nov 2021 21:58:46 +0000 (21:58 +0000)
committerRoberto C. Sánchez <roberto@debian.org>
Fri, 19 Nov 2021 21:58:46 +0000 (21:58 +0000)
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 53398539ac20f86019266c45276a8ebc3a1ef9e9..02b53740136f5b1e5542757472eb75a9c41d106a 100644 (file)
@@ -11,7 +11,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(),
 
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 5f777bb4e1bf1134600e702ab96be70dc3592c30..b079e6f31bec29676b5a035a485c55e18fe16cc1 100644 (file)
@@ -823,6 +823,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 = []