Use softfp for linux gnueabi, keep the warning for everything else.

llvm-svn: 106984
This commit is contained in:
Rafael Espindola 2010-06-27 18:29:21 +00:00
parent 3f48c603fb
commit b1ef8ffb15
1 changed files with 9 additions and 2 deletions

View File

@ -431,8 +431,6 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
// If unspecified, choose the default based on the platform.
if (FloatABI.empty()) {
// FIXME: This is wrong for non-Darwin, we don't have a mechanism yet for
// distinguishing things like linux-eabi vs linux-elf.
switch (getToolChain().getTriple().getOS()) {
case llvm::Triple::Darwin: {
// Darwin defaults to "softfp" for v6 and v7.
@ -446,6 +444,15 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
break;
}
case llvm::Triple::Linux: {
llvm::StringRef Env = getToolChain().getTriple().getEnvironmentName();
if (Env == "gnueabi") {
FloatABI = "softfp";
break;
}
}
// fall through
default:
// Assume "soft", but warn the user we are guessing.
FloatABI = "soft";