aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-02 05:43:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-02 05:43:59 +0000
commit214afe96b4210ca36d99621dd930225e6bf5b9b3 (patch)
treee57f70bd8f28e6cb85146a4ffcf74d047a3723ea /lib/Driver/ToolChains.cpp
parent4180011fb8cef06adec04d30486b1bf3b99aa8b8 (diff)
Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize tool
chain construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index bdccc3e3da..5a4ad6023c 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -889,8 +889,16 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const {
/// FreeBSD - FreeBSD tool chain which can call as(1) and ld(1) directly.
-FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple, bool Lib32)
+FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple)
: Generic_GCC(Host, Triple) {
+
+ // Determine if we are compiling 32-bit code on an x86_64 platform.
+ bool Lib32 = false;
+ if (Triple.getArch() == llvm::Triple::x86 &&
+ llvm::Triple(getDriver().DefaultHostTriple).getArch() ==
+ llvm::Triple::x86_64)
+ Lib32 = true;
+
getProgramPaths().push_back(getDriver().Dir + "/../libexec");
getProgramPaths().push_back("/usr/libexec");
if (Lib32) {