[cfe-commits] r132634 - in /cfe/trunk/lib/Driver: ToolChains.cpp Tools.cpp
Roman Divacky
rdivacky at freebsd.org
Sat Jun 4 00:37:31 PDT 2011
Author: rdivacky
Date: Sat Jun 4 02:37:31 2011
New Revision: 132634
URL: http://llvm.org/viewvc/llvm-project?rev=132634&view=rev
Log:
Make -m32 work on FreeBSD/PowerPC64.
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=132634&r1=132633&r2=132634&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sat Jun 4 02:37:31 2011
@@ -1007,6 +1007,11 @@
llvm::Triple::x86_64)
Lib32 = true;
+ if (Triple.getArch() == llvm::Triple::ppc &&
+ llvm::Triple(getDriver().DefaultHostTriple).getArch() ==
+ llvm::Triple::ppc64)
+ Lib32 = true;
+
if (Lib32) {
getFilePaths().push_back("/usr/lib32");
} else {
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=132634&r1=132633&r2=132634&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Jun 4 02:37:31 2011
@@ -3460,6 +3460,8 @@
if (getToolChain().getArchName() == "i386")
CmdArgs.push_back("--32");
+ if (getToolChain().getArchName() == "powerpc")
+ CmdArgs.push_back("-a32");
// Set byte order explicitly
if (getToolChain().getArchName() == "mips")
More information about the cfe-commits
mailing list