Make -m32 work on FreeBSD/PowerPC64.

llvm-svn: 132634
This commit is contained in:
Roman Divacky
2011-06-04 07:37:31 +00:00
parent baf1afb289
commit 00859c29bf
2 changed files with 7 additions and 0 deletions

View File

@@ -1007,6 +1007,11 @@ FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple)
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 {

View File

@@ -3460,6 +3460,8 @@ void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
if (getToolChain().getArchName() == "i386")
CmdArgs.push_back("--32");
if (getToolChain().getArchName() == "powerpc")
CmdArgs.push_back("-a32");
// Set byte order explicitly
if (getToolChain().getArchName() == "mips")