Index: clang/lib/Driver/ToolChains/Linux.cpp =================================================================== --- clang/lib/Driver/ToolChains/Linux.cpp +++ clang/lib/Driver/ToolChains/Linux.cpp @@ -426,6 +426,7 @@ if (Triple.isMusl()) { std::string ArchName; bool IsArm = false; + bool IsMips = false; switch (Arch) { case llvm::Triple::arm: @@ -438,14 +439,25 @@ ArchName = "armeb"; IsArm = true; break; + case llvm::Triple::mips: + case llvm::Triple::mipsel: + case llvm::Triple::mips64: + case llvm::Triple::mips64el: + IsMips = true; + ArchName = Triple.getArchName().str(); + break; default: ArchName = Triple.getArchName().str(); } + if (IsArm && (Triple.getEnvironment() == llvm::Triple::MuslEABIHF || tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard)) ArchName += "hf"; + if (IsMips && tools::mips::getMipsFloatABI(getDriver(), Args, getTriple()) == tools::mips::FloatABI::Soft) + ArchName += "-sf"; + return "/lib/ld-musl-" + ArchName + ".so.1"; }