aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/HostInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-01 20:33:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-01 20:33:11 +0000
commitbf54a06f9b771c2a2730cc63eb89bce0522515b5 (patch)
treedcd8ae096ff43434ac743e95bf25e25409745c24 /lib/Driver/HostInfo.cpp
parent2add47387d39ee6c40dcb0e9f3d51c27ad1e113c (diff)
Quick and dirty (!) fix to make sure we use powerpc in triples.
- PR3922 - I have a clean solution for this in flight, but it may take a while to come to fruition so we'll take a quick fix for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/HostInfo.cpp')
-rw-r--r--lib/Driver/HostInfo.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp
index 2ce06f512d..8db18d4d38 100644
--- a/lib/Driver/HostInfo.cpp
+++ b/lib/Driver/HostInfo.cpp
@@ -77,7 +77,7 @@ DarwinHostInfo::DarwinHostInfo(const Driver &D, const char *_Arch,
: HostInfo(D, _Arch, _Platform, _OS) {
assert((getArchName() == "i386" || getArchName() == "x86_64" ||
- getArchName() == "ppc" || getArchName() == "ppc64") &&
+ getArchName() == "powerpc" || getArchName() == "powerpc64") &&
"Unknown Darwin arch.");
assert(memcmp(&getOSName()[0], "darwin", 6) == 0 &&
@@ -117,11 +117,17 @@ ToolChain *DarwinHostInfo::getToolChain(const ArgList &Args,
if (getArchName() == "i386" || getArchName() == "x86_64") {
ArchName =
(A->getOption().getId() == options::OPT_m32) ? "i386" : "x86_64";
- } else if (getArchName() == "ppc" || getArchName() == "ppc64") {
- ArchName =
- (A->getOption().getId() == options::OPT_m32) ? "ppc" : "ppc64";
+ } else if (getArchName() == "powerpc" || getArchName() == "powerpc64") {
+ ArchName = (A->getOption().getId() == options::OPT_m32) ? "powerpc" :
+ "powerpc64";
}
}
+ } else {
+ // Normalize arch name; we shouldn't be doing this here.
+ if (strcmp(ArchName, "ppc") == 0)
+ ArchName = "powerpc";
+ else if (strcmp(ArchName, "ppc64") == 0)
+ ArchName = "powerpc64";
}
ToolChain *&TC = ToolChains[ArchName];
@@ -190,9 +196,9 @@ ToolChain *UnknownHostInfo::getToolChain(const ArgList &Args,
if (getArchName() == "i386" || getArchName() == "x86_64") {
ArchName =
(A->getOption().getId() == options::OPT_m32) ? "i386" : "x86_64";
- } else if (getArchName() == "ppc" || getArchName() == "ppc64") {
+ } else if (getArchName() == "powerpc" || getArchName() == "powerpc64") {
ArchName =
- (A->getOption().getId() == options::OPT_m32) ? "ppc" : "ppc64";
+ (A->getOption().getId() == options::OPT_m32) ? "powerpc" : "powerpc64";
}
}