rustc: set MIPS cpu/features in the compiler

cf #31303
This commit is contained in:
Jorge Aparicio 2016-01-30 03:28:37 -05:00
parent 146dfce803
commit 64ac041b1f
4 changed files with 14 additions and 7 deletions

View File

@ -20,5 +20,5 @@ CFG_UNIXY_mips-unknown-linux-musl := 1
CFG_LDPATH_mips-unknown-linux-musl :=
CFG_RUN_mips-unknown-linux-musl=
CFG_RUN_TARG_mips-unknown-linux-musl=
RUSTC_FLAGS_mips-unknown-linux-musl := -C target-cpu=mips32r2 -C target-feature="+mips32r2" -C soft-float
RUSTC_FLAGS_mips-unknown-linux-musl :=
CFG_GNU_TRIPLE_mips-unknown-linux-musl := mips-unknown-linux-musl

View File

@ -20,5 +20,5 @@ CFG_UNIXY_mipsel-unknown-linux-musl := 1
CFG_LDPATH_mipsel-unknown-linux-musl :=
CFG_RUN_mipsel-unknown-linux-musl=
CFG_RUN_TARG_mipsel-unknown-linux-musl=
RUSTC_FLAGS_mipsel-unknown-linux-musl := -C target-cpu=mips32 -C target-feature="+mips32"
RUSTC_FLAGS_mipsel-unknown-linux-musl :=
CFG_GNU_TRIPLE_mipsel-unknown-linux-musl := mipsel-unknown-linux-musl

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use target::Target;
use target::{Target, TargetOptions};
pub fn target() -> Target {
Target {
@ -19,6 +19,10 @@ pub fn target() -> Target {
target_os: "linux".to_string(),
target_env: "musl".to_string(),
target_vendor: "unknown".to_string(),
options: super::linux_base::opts()
options: TargetOptions {
cpu: "mips32r2".to_string(),
features: "+mips32r2,+soft-float".to_string(),
..super::linux_base::opts()
}
}
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use target::Target;
use target::{Target, TargetOptions};
pub fn target() -> Target {
Target {
@ -19,7 +19,10 @@ pub fn target() -> Target {
target_os: "linux".to_string(),
target_env: "musl".to_string(),
target_vendor: "unknown".to_string(),
options: super::linux_base::opts()
options: TargetOptions {
cpu: "mips32".to_string(),
features: "+mips32".to_string(),
..super::linux_base::opts()
}
}
}