Package: rustc / 1.46.0+dfsg1-1

u-mips-fixes.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Various fixes for Rust on MIPS
Author: Dragan Mladjenovic <dmladjenovic@wavecomp.com>
Bug-Debian: https://bugs.debian.org/881845
Last-Update: 2020-03-23

Index: rust/src/librustc_codegen_llvm/llvm_util.rs
===================================================================
--- rust.orig/src/librustc_codegen_llvm/llvm_util.rs
+++ rust/src/librustc_codegen_llvm/llvm_util.rs
@@ -108,6 +108,12 @@ unsafe fn configure_llvm(sess: &Session)
         // during inlining. Unfortunately these may block other optimizations.
         add("-preserve-alignment-assumptions-during-inlining=false", false);
 
+        if sess.target.target.arch == "mips"
+            || sess.target.target.arch == "mips64"
+        {
+            add("-fast-isel=0", false);
+        }
+
         for arg in sess_args {
             add(&(*arg), true);
         }