Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: Set MIPS cpu/features in the compiler #31303

Merged
merged 1 commit into from
Feb 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mk/cfg/mips-unknown-linux-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ CFG_UNIXY_mips-unknown-linux-gnu := 1
CFG_LDPATH_mips-unknown-linux-gnu :=
CFG_RUN_mips-unknown-linux-gnu=
CFG_RUN_TARG_mips-unknown-linux-gnu=
RUSTC_FLAGS_mips-unknown-linux-gnu := -C target-cpu=mips32r2 -C target-feature="+mips32r2" -C soft-float
RUSTC_FLAGS_mips-unknown-linux-gnu :=
CFG_GNU_TRIPLE_mips-unknown-linux-gnu := mips-unknown-linux-gnu
2 changes: 1 addition & 1 deletion mk/cfg/mipsel-unknown-linux-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ CFG_UNIXY_mipsel-unknown-linux-gnu := 1
CFG_LDPATH_mipsel-unknown-linux-gnu :=
CFG_RUN_mipsel-unknown-linux-gnu=
CFG_RUN_TARG_mipsel-unknown-linux-gnu=
RUSTC_FLAGS_mipsel-unknown-linux-gnu := -C target-cpu=mips32 -C target-feature="+mips32"
RUSTC_FLAGS_mipsel-unknown-linux-gnu :=
CFG_GNU_TRIPLE_mipsel-unknown-linux-gnu := mipsel-unknown-linux-gnu
8 changes: 6 additions & 2 deletions src/librustc_back/target/mips_unknown_linux_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -19,6 +19,10 @@ pub fn target() -> Target {
target_os: "linux".to_string(),
target_env: "gnu".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()
},
}
}
8 changes: 6 additions & 2 deletions src/librustc_back/target/mipsel_unknown_linux_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -20,6 +20,10 @@ pub fn target() -> Target {
target_env: "gnu".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()
},
}
}