[cfe-commits] r145321 - in /cfe/trunk/lib/Driver: ToolChains.cpp Tools.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Nov 28 15:46:52 PST 2011
Author: efriedma
Date: Mon Nov 28 17:46:52 2011
New Revision: 145321
URL: http://llvm.org/viewvc/llvm-project?rev=145321&view=rev
Log:
A couple driver fixes for PPC Linux. Patches by Michael Kostylev. PR11444/PR11445.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=145321&r1=145320&r2=145321&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Nov 28 17:46:52 2011
@@ -1234,7 +1234,8 @@
} else if (HostArch == llvm::Triple::ppc64) {
static const char *const PPC64LibDirs[] = { "/lib64", "/lib" };
static const char *const PPC64Triples[] = {
- "powerpc64-unknown-linux-gnu"
+ "powerpc64-unknown-linux-gnu",
+ "ppc64-redhat-linux"
};
LibDirs.append(PPC64LibDirs,
PPC64LibDirs + llvm::array_lengthof(PPC64LibDirs));
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=145321&r1=145320&r2=145321&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Nov 28 17:46:52 2011
@@ -4249,6 +4249,14 @@
CmdArgs.push_back("--32");
} else if (getToolChain().getArch() == llvm::Triple::x86_64) {
CmdArgs.push_back("--64");
+ } else if (getToolChain().getArch() == llvm::Triple::ppc) {
+ CmdArgs.push_back("-a32");
+ CmdArgs.push_back("-mppc");
+ CmdArgs.push_back("-many");
+ } else if (getToolChain().getArch() == llvm::Triple::ppc64) {
+ CmdArgs.push_back("-a64");
+ CmdArgs.push_back("-mppc64");
+ CmdArgs.push_back("-many");
} else if (getToolChain().getArch() == llvm::Triple::arm) {
StringRef MArch = getToolChain().getArchName();
if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a")
More information about the cfe-commits
mailing list