aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-06 19:11:49 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-06 19:11:49 +0000
commitf0594d8b64cf32c55dde7a49ba849e864446c92b (patch)
tree8462472a098e99ec54eddbb579bcee3c081561e2 /lib/Driver/ToolChains.cpp
parent841b238087d6cdb21c2443b7429cb85bd1f9fce2 (diff)
Fix driver for thumb-capable ARM hosts, from Mikko Lehtonen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index bb83492158..7cae9ba027 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -114,7 +114,8 @@ llvm::StringRef Darwin::getDarwinArchName(const ArgList &Args) const {
switch (getTriple().getArch()) {
default:
return getArchName();
-
+
+ case llvm::Triple::thumb:
case llvm::Triple::arm: {
if (const Arg *A = Args.getLastArg(options::OPT_march_EQ))
if (const char *Arch = GetArmArchForMArch(A->getValue(Args)))
@@ -1401,7 +1402,7 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
Lib64 = "lib64";
std::string GccTriple = "";
- if (Arch == llvm::Triple::arm) {
+ if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) {
if (!llvm::sys::fs::exists("/usr/lib/gcc/arm-linux-gnueabi", Exists) &&
Exists)
GccTriple = "arm-linux-gnueabi";
@@ -1486,7 +1487,7 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
ExtraOpts.push_back("relro");
}
- if (Arch == llvm::Triple::arm)
+ if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb)
ExtraOpts.push_back("-X");
if (IsFedora(Distro) || Distro == UbuntuMaverick)