Skip to content

Commit 64ac041

Browse files
author
Jorge Aparicio
committed
rustc: set MIPS cpu/features in the compiler
cf #31303
1 parent 146dfce commit 64ac041

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

mk/cfg/mips-unknown-linux-musl.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ CFG_UNIXY_mips-unknown-linux-musl := 1
2020
CFG_LDPATH_mips-unknown-linux-musl :=
2121
CFG_RUN_mips-unknown-linux-musl=
2222
CFG_RUN_TARG_mips-unknown-linux-musl=
23-
RUSTC_FLAGS_mips-unknown-linux-musl := -C target-cpu=mips32r2 -C target-feature="+mips32r2" -C soft-float
23+
RUSTC_FLAGS_mips-unknown-linux-musl :=
2424
CFG_GNU_TRIPLE_mips-unknown-linux-musl := mips-unknown-linux-musl

mk/cfg/mipsel-unknown-linux-musl.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ CFG_UNIXY_mipsel-unknown-linux-musl := 1
2020
CFG_LDPATH_mipsel-unknown-linux-musl :=
2121
CFG_RUN_mipsel-unknown-linux-musl=
2222
CFG_RUN_TARG_mipsel-unknown-linux-musl=
23-
RUSTC_FLAGS_mipsel-unknown-linux-musl := -C target-cpu=mips32 -C target-feature="+mips32"
23+
RUSTC_FLAGS_mipsel-unknown-linux-musl :=
2424
CFG_GNU_TRIPLE_mipsel-unknown-linux-musl := mipsel-unknown-linux-musl

src/librustc_back/target/mips_unknown_linux_musl.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use target::Target;
11+
use target::{Target, TargetOptions};
1212

1313
pub fn target() -> Target {
1414
Target {
@@ -19,6 +19,10 @@ pub fn target() -> Target {
1919
target_os: "linux".to_string(),
2020
target_env: "musl".to_string(),
2121
target_vendor: "unknown".to_string(),
22-
options: super::linux_base::opts()
22+
options: TargetOptions {
23+
cpu: "mips32r2".to_string(),
24+
features: "+mips32r2,+soft-float".to_string(),
25+
..super::linux_base::opts()
26+
}
2327
}
2428
}

src/librustc_back/target/mipsel_unknown_linux_musl.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use target::Target;
11+
use target::{Target, TargetOptions};
1212

1313
pub fn target() -> Target {
1414
Target {
@@ -19,7 +19,10 @@ pub fn target() -> Target {
1919
target_os: "linux".to_string(),
2020
target_env: "musl".to_string(),
2121
target_vendor: "unknown".to_string(),
22-
23-
options: super::linux_base::opts()
22+
options: TargetOptions {
23+
cpu: "mips32".to_string(),
24+
features: "+mips32".to_string(),
25+
..super::linux_base::opts()
26+
}
2427
}
2528
}

0 commit comments

Comments
 (0)