diff options
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index f56ab4379a..7b5183c106 100644 --- a/lib/Driver/ToolChains.cpp +++ b/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); |