// 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.
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";