rustc/debian/patches/d-rustc-fix-mips64el-bootstrap.patch
Fabian Grünbichler 8c7f677448 rebase patches
and drop those applied upstream/no longer needed

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-03-08 11:30:22 +00:00

42 lines
1.7 KiB
Diff

Bug: https://github.com/rust-lang/rust/issues/52108
--- 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":
--- 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 @@
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(),
--- 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 @@
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(),
--- 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