[cfe-commits] r78272 - /cfe/trunk/lib/Driver/ToolChains.cpp

Daniel Dunbar daniel at zuster.org
Wed Aug 5 18:47:31 PDT 2009


Author: ddunbar
Date: Wed Aug  5 20:47:11 2009
New Revision: 78272

URL: http://llvm.org/viewvc/llvm-project?rev=78272&view=rev
Log:
Add additional library paths for Linux distros on mixed 32/64-bit systems.
 - Patch by Carl-Daniel Hailfinger.

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=78272&r1=78271&r2=78272&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Aug  5 20:47:11 2009
@@ -456,6 +456,15 @@
   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





More information about the cfe-commits mailing list