Cross posting from developer mailing list, in case that helps get this committed somehow.
http://thread.gmane.org/gmane.comp.compilers.clang.devel/30170/focus=31196 Thanks, Steve.
>From 50644d5acfa3991d755e97996b3f97f66b7292e8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly <[email protected]> Date: Mon, 12 Aug 2013 16:48:32 +0200 Subject: [PATCH] Use a better default arch for a cpu that supports hardware float. --- lib/Driver/ToolChain.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index 4fe3560..c16b5fd 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -176,7 +176,7 @@ static const char *getARMTargetCPU(const ArgList &Args, MArch = Triple.getArchName(); } - return llvm::StringSwitch<const char *>(MArch) + const char *result = llvm::StringSwitch<const char *>(MArch) .Cases("armv2", "armv2a","arm2") .Case("armv3", "arm6") .Case("armv3m", "arm7m") @@ -203,7 +203,15 @@ static const char *getARMTargetCPU(const ArgList &Args, .Case("xscale", "xscale") // If all else failed, return the most base CPU with thumb interworking // supported by LLVM. - .Default("arm7tdmi"); + .Default(0); + + if (result) + return result; + + return + Triple.getEnvironment() == llvm::Triple::GNUEABIHF + ? "arm1176jzf-s" + : "arm7tdmi"; } /// getLLVMArchSuffixForARM - Get the LLVM arch name to use for a particular -- 1.8.1.2
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
