diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-09-01 16:25:49 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-09-01 16:25:49 +0000 |
commit | 5f344fff089dd7685bd0013ef6f03b318819b334 (patch) | |
tree | befdb548b33ea60230a7abf923236ba4ee1f9ca6 /clang/lib/Driver | |
parent | ecc25a2812aa47ab912f54942750fce24e129234 (diff) | |
download | bcm5719-llvm-5f344fff089dd7685bd0013ef6f03b318819b334.tar.gz bcm5719-llvm-5f344fff089dd7685bd0013ef6f03b318819b334.zip |
Fix PR10744 by adding the toolchain path to the regular program path
and doing a simple search. Before we would manually check for the linker
before the -B options were searched.
llvm-svn: 138941
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index f56ab4379a2..7b5183c1066 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1617,11 +1617,12 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) Lib = Lib64; } - llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld"); - if (!llvm::sys::fs::exists(LinkerPath.str(), Exists) && Exists) - Linker = LinkerPath.str(); - else - Linker = GetProgramPath("ld"); + // OpenSuse stores the linker with the compiler, add that to the search + // path. + ToolChain::path_list &PPaths = getProgramPaths(); + PPaths.push_back(Base + "/../../../../" + GccTriple + "/bin"); + + Linker = GetProgramPath("ld"); LinuxDistro Distro = DetectLinuxDistro(Arch); |