From: Rafael Espindola Date: Fri, 3 Jun 2011 15:39:42 +0000 (+0000) Subject: We were looking at /usr/lib only if the distro had multilib. This is bogus: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7409a0005f1d1efd7026ee84871afe588740b49;p=clang We were looking at /usr/lib only if the distro had multilib. This is bogus: we look in /usr/lib to find crt1.o, and that depends only on where libc is installed. This fixes the case of using a different gcc installation in a distro without multilib. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132551 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 87703ddffc..4953d4b3ee 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1521,9 +1521,14 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) if (IsOpenSuse(Distro) && Is32Bits) Paths.push_back(Base + "/../../../../" + GccTriple + "/lib/../lib"); Paths.push_back(Base + "/../../../../" + Lib); - Paths.push_back("/lib/../" + Lib); - Paths.push_back("/usr/lib/../" + Lib); } + + // FIXME: This is in here to find crt1.o. It is provided by libc, and + // libc (like gcc), can be installed in any directory. Once we are + // fetching this from a config file, we should have a libc prefix. + Paths.push_back("/lib/../" + Lib); + Paths.push_back("/usr/lib/../" + Lib); + if (!Suffix.empty()) Paths.push_back(Base); if (IsOpenSuse(Distro))