diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2012-02-26 09:03:21 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2012-02-26 09:03:21 +0000 |
| commit | af3c2090b4158f9ed56320553d10506e9838cb6e (patch) | |
| tree | fbe02f73424702ba4710c2b3e97d820786bb1b0e /clang/lib | |
| parent | dc497b6c1c566705013ab7900bb740ebde285711 (diff) | |
| download | bcm5719-llvm-af3c2090b4158f9ed56320553d10506e9838cb6e.tar.gz bcm5719-llvm-af3c2090b4158f9ed56320553d10506e9838cb6e.zip | |
Add support for PPC and PPC64 multiarch toolchains on Debain.
Patch from Michel Dänzer, sent our way via Jeremy Huddleston who added
64-bit support. I just added one other place where powerpc64-linux-gnu
was missing (we only had powerpc64-unknown-linux-gnu).
I've also added a tree to test out the debian multiarch stuff. I don't
use debian regularly, so I'm not certain this is entirely accurate. If
anyone wants to check it against a debian system and fix any
inaccuracies, fire away. This way at least folks can see how this is
*supposed* to be tested.
It'd be particularly good to get the Debian MIPS toolchains tested in
this way.
llvm-svn: 151482
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index e30828d1b04..20b284292df 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1219,6 +1219,7 @@ Generic_GCC::GCCInstallationDetector::GCCInstallationDetector( }; static const char *const PPC64LibDirs[] = { "/lib64", "/lib" }; static const char *const PPC64Triples[] = { + "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu", "powerpc64-suse-linux", "ppc64-redhat-linux" @@ -1962,6 +1963,14 @@ static std::string getMultiarchTriple(const llvm::Triple TargetTriple, if (llvm::sys::fs::exists(SysRoot + "/lib/mipsel-linux-gnu")) return "mipsel-linux-gnu"; return TargetTriple.str(); + case llvm::Triple::ppc: + if (llvm::sys::fs::exists(SysRoot + "/lib/powerpc-linux-gnu")) + return "powerpc-linux-gnu"; + return TargetTriple.str(); + case llvm::Triple::ppc64: + if (llvm::sys::fs::exists(SysRoot + "/lib/powerpc64-linux-gnu")) + return "powerpc64-linux-gnu"; + return TargetTriple.str(); } } |

