[mips] Consult triple's vendor field before using musl's interpreter.

This should affect only the mips-mti-linux toolchain.

llvm-svn: 269411
This commit is contained in:
Vasileios Kalintiris 2016-05-13 12:13:13 +00:00
parent e91e52671a
commit b3f9f5f963
1 changed files with 3 additions and 1 deletions

View File

@ -8991,7 +8991,9 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
bool IsNaN2008 = mips::isNaN2008(Args, ToolChain.getTriple());
if (mips::isUCLibc(Args))
LibName = IsNaN2008 ? "ld-uClibc-mipsn8.so.0" : "ld-uClibc.so.0";
else if (!ToolChain.getTriple().hasEnvironment()) {
else if (!ToolChain.getTriple().hasEnvironment() &&
ToolChain.getTriple().getVendor() ==
llvm::Triple::VendorType::MipsTechnologies) {
bool LE = (ToolChain.getTriple().getArch() == llvm::Triple::mipsel) ||
(ToolChain.getTriple().getArch() == llvm::Triple::mips64el);
LibName = LE ? "ld-musl-mipsel.so.1" : "ld-musl-mips.so.1";