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 := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32
+RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32 -Z soft-float
# i686-pc-mingw32 configuration
CC_i686-pc-mingw32=$(CC)
session::Default => lib::llvm::CodeGenLevelDefault,
session::Aggressive => lib::llvm::CodeGenLevelAggressive,
};
+ let use_softfp = sess.opts.debugging_opts & session::use_softfp != 0;
let tm = do sess.targ_cfg.target_strs.target_triple.with_c_str |T| {
do sess.opts.target_cpu.with_c_str |CPU| {
lib::llvm::CodeModelDefault,
lib::llvm::RelocPIC,
OptLevel,
- true
+ true,
+ use_softfp
)
}
}
pub static no_vectorize_loops: uint = 1 << 27;
pub static no_vectorize_slp: uint = 1 << 28;
pub static no_prepopulate_passes: uint = 1 << 29;
+pub static use_softfp: uint = 1 << 30;
pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
~[(~"verbose", ~"in general, enable more debug printouts", verbose),
(~"no-vectorize-slp",
~"Don't run LLVM's SLP vectorization passes",
no_vectorize_slp),
+ (~"soft-float", ~"Generate software floating point library calls", use_softfp),
]
}
Model: CodeGenModel,
Reloc: RelocMode,
Level: CodeGenOptLevel,
- EnableSegstk: bool) -> TargetMachineRef;
+ EnableSegstk: bool,
+ UseSoftFP: bool) -> TargetMachineRef;
pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);
pub fn LLVMRustAddAnalysisPasses(T: TargetMachineRef,
PM: PassManagerRef,
CodeModel::Model CM,
Reloc::Model RM,
CodeGenOpt::Level OptLevel,
- bool EnableSegmentedStacks) {
+ bool EnableSegmentedStacks,
+ bool UseSoftFloat) {
std::string Error;
Triple Trip(Triple::normalize(triple));
const llvm::Target *TheTarget = TargetRegistry::lookupTarget(Trip.getTriple(),
Options.FloatABIType =
(Trip.getEnvironment() == Triple::GNUEABIHF) ? FloatABI::Hard :
FloatABI::Default;
+ Options.UseSoftFloat = UseSoftFloat;
+ if (UseSoftFloat) {
+ Options.FloatABIType = FloatABI::Soft;
+ }
TargetMachine *TM = TheTarget->createTargetMachine(Trip.getTriple(),
cpu,