diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-06-03 15:39:42 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-06-03 15:39:42 +0000 |
| commit | 304902141e5f5ba71cb392fab2c0203c56643753 (patch) | |
| tree | c05981c4f3d0b9b9a09f303aa0974ea37b477d43 /clang/lib | |
| parent | d8f92c8dcc3a08640680e1a627632ae6eb379887 (diff) | |
| download | bcm5719-llvm-304902141e5f5ba71cb392fab2c0203c56643753.tar.gz bcm5719-llvm-304902141e5f5ba71cb392fab2c0203c56643753.zip | |
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
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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)) |

