summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-06 01:47:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-06 01:47:11 +0000
commitb46b5bbaa8f4063dfa307f214d65cb9b38ab15f6 (patch)
tree60fd1cf539be8b90dfbaeac05003738bd10fae93 /clang
parent4728100e8d70d672bca98b72324de35dbecb431e (diff)
downloadbcm5719-llvm-b46b5bbaa8f4063dfa307f214d65cb9b38ab15f6.tar.gz
bcm5719-llvm-b46b5bbaa8f4063dfa307f214d65cb9b38ab15f6.zip
Add additional library paths for Linux distros on mixed 32/64-bit systems.
- Patch by Carl-Daniel Hailfinger. llvm-svn: 78272
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Driver/ToolChains.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index f663ed49536..eb304958c2d 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -456,6 +456,15 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple)
getFilePaths().push_back(getHost().getDriver().Dir + "/../lib/clang/1.0/");
getFilePaths().push_back("/lib/");
getFilePaths().push_back("/usr/lib/");
+
+ // Depending on the Linux distribution, any combination of lib{,32,64} is
+ // possible. E.g. Debian uses lib and lib32 for mixed i386/x86-64 systems,
+ // openSUSE uses lib and lib64 for the same purpose.
+ getFilePaths().push_back("/lib32/");
+ getFilePaths().push_back("/usr/lib32/");
+ getFilePaths().push_back("/lib64/");
+ getFilePaths().push_back("/usr/lib64/");
+
// FIXME: Figure out some way to get gcc's libdir
// (e.g. /usr/lib/gcc/i486-linux-gnu/4.3/ for Ubuntu 32-bit); we need
// crtbegin.o/crtend.o/etc., and want static versions of various
OpenPOWER on IntegriCloud