[PATCH] D80421: [Mips] use correct ld.so for musl soft float
Joe Holden via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 21 16:15:25 PST 2021
joewholden updated this revision to Diff 318346.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80421/new/
https://reviews.llvm.org/D80421
Files:
clang/lib/Driver/ToolChains/Linux.cpp
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";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80421.318346.patch
Type: text/x-patch
Size: 1125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210122/9bc29fd9/attachment.bin>
More information about the cfe-commits
mailing list