]> granicus.if.org Git - clang/commitdiff
Use softfp for linux gnueabi, keep the warning for everything else.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 27 Jun 2010 18:29:21 +0000 (18:29 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 27 Jun 2010 18:29:21 +0000 (18:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106984 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 22b14825ef3307da2f7fdc498c58a439979a4408..ffdb3d92f0f471203754c1aeecf00fac9c5d4205 100644 (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";