From 7e9cebfe1246bb9051a364474b6570eb40dbac4b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sun, 27 Jun 2010 18:29:21 +0000 Subject: [PATCH] Use softfp for linux gnueabi, keep the warning for everything else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106984 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 22b14825ef..ffdb3d92f0 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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"; -- 2.40.0