summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-06-03 15:39:42 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-06-03 15:39:42 +0000
commit304902141e5f5ba71cb392fab2c0203c56643753 (patch)
treec05981c4f3d0b9b9a09f303aa0974ea37b477d43 /clang/lib/Driver/ToolChains.cpp
parentd8f92c8dcc3a08640680e1a627632ae6eb379887 (diff)
downloadbcm5719-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/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp9
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))
OpenPOWER on IntegriCloud