From 304902141e5f5ba71cb392fab2c0203c56643753 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 3 Jun 2011 15:39:42 +0000 Subject: 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. llvm-svn: 132551 --- clang/lib/Driver/ToolChains.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'clang/lib/Driver/ToolChains.cpp') diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 87703ddffc6..4953d4b3eef 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/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)) -- cgit v1.2.3