summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-25 22:55:16 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-25 22:55:16 +0000
commite8be6652cebf005b39d490d72fd4d63e52779160 (patch)
treec764569cb8d403c4ce9e5239cc599a19c25da849 /clang/lib/Driver/ToolChains.cpp
parenta98d1f8ca63bbe8770dacec5e4ebee5070c0766d (diff)
downloadbcm5719-llvm-e8be6652cebf005b39d490d72fd4d63e52779160.tar.gz
bcm5719-llvm-e8be6652cebf005b39d490d72fd4d63e52779160.zip
Revert r148981 because it fails test/Driver/freebsd.c
Original log: Author: chandlerc <chandlerc@91177308-0d34-0410-b5e6-96231b3b80d8> Date: Wed Jan 25 21:32:31 2012 +0000 Try to unbreak the FreeBSD toolchain's detection of 32-bit targets inside a 64-bit freebsd machine with the 32-bit compatibility layer installed. The FreeBSD image always has the /usr/lib32 directory, so test for the more concrete existence of crt1.o. Also enhance the tests for freebsd to clarify what these trees look like and exercise the new code. Thanks to all the FreeBSD folks for helping me understand what caused the failure and how we might fix it. =] That helps a lot. Also, yay build bots. llvm-svn: 148993
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index c39d6243465..44f51e4c5d5 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1627,11 +1627,11 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA,
FreeBSD::FreeBSD(const Driver &D, const llvm::Triple& Triple)
: Generic_ELF(D, Triple) {
- // When targeting 32-bit platforms, look for '/usr/lib32/crt1.o' and fall
- // back to '/usr/lib' if it doesn't exist.
+ // When targeting 32-bit platforms, look for '/usr/lib32' first and fall back
+ // to '/usr/lib' for the remaining cases.
if ((Triple.getArch() == llvm::Triple::x86 ||
Triple.getArch() == llvm::Triple::ppc) &&
- llvm::sys::fs::exists(getDriver().SysRoot + "/usr/lib32/crt1.o"))
+ llvm::sys::fs::exists(getDriver().SysRoot + "/usr/lib32"))
getFilePaths().push_back(getDriver().SysRoot + "/usr/lib32");
else
getFilePaths().push_back(getDriver().SysRoot + "/usr/lib");
OpenPOWER on IntegriCloud