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

Peter Collingbourne peter at pcc.me.uk
Thu Sep 29 08:42:28 CDT 2011


Author: pcc
Date: Thu Sep 29 08:42:24 2011
New Revision: 140782

URL: http://llvm.org/viewvc/llvm-project?rev=140782&view=rev
Log:
Driver: use correct search paths for multilib

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=140782&r1=140781&r2=140782&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Sep 29 08:42:24 2011
@@ -1519,14 +1519,14 @@
   bool Exists;
   llvm::SmallVector<std::string, 8> Paths(D.PrefixDirs.begin(),
       D.PrefixDirs.end());
-  Paths.push_back("/usr/lib/");
+  Paths.push_back("/usr/");
   const std::string *Triples[] = {&GccTriple, &D.DefaultHostTriple};
   for (llvm::SmallVector<std::string, 8>::const_iterator it = Paths.begin(),
        ie = Paths.end(); it != ie; ++it) {
     for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) {
       for (unsigned j = 0; j < sizeof(Triples)/sizeof(Triples[0]); ++j) {
         std::string Suffix = *Triples[j] + "/" + GccVersions[i];
-        std::string t1 = *it + "gcc/" + Suffix;
+        std::string t1 = *it + "lib/gcc/" + Suffix;
         if (!llvm::sys::fs::exists(t1 + "/crtbegin.o", Exists) && Exists)
           return t1;
         std::string t2 = *it + "lib64/gcc/" + Suffix;




More information about the cfe-commits mailing list