[PATCH] Choose right dynamic linker when hard float ABI is expressed on commandline
Khem Raj
raj.khem at gmail.com
Thu Jul 9 00:19:43 PDT 2015
Currently trigger to select hard-float linker is only based of -gnueahf
appearing in target triplet, but we should also select it when hardfloat
is requested via cmdline
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
lib/Driver/Tools.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 1795ccf..3f5fb3f 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -7800,13 +7800,15 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
else if (Arch == llvm::Triple::aarch64_be)
return "/lib/ld-linux-aarch64_be.so.1";
else if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) {
- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
+ if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF ||
+ tools::arm::getARMFloatABI(ToolChain.getDriver(), Args, ToolChain.getTriple()) == "hard")
return "/lib/ld-linux-armhf.so.3";
else
return "/lib/ld-linux.so.3";
} else if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb) {
// TODO: check which dynamic linker name.
- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
+ if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF ||
+ tools::arm::getARMFloatABI(ToolChain.getDriver(), Args, ToolChain.getTriple()) == "hard")
return "/lib/ld-linux-armhf.so.3";
else
return "/lib/ld-linux.so.3";
--
2.1.4
More information about the cfe-commits
mailing list