@@ -, +, @@ --- lib/Driver/Tools.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/lib/Driver/Tools.cpp +++ a/lib/Driver/Tools.cpp @@ -838,8 +838,12 @@ arm::FloatABI arm::getARMFloatABI(const ToolChain &TC, const ArgList &Args) { case llvm::Triple::GNUEABI: case llvm::Triple::MuslEABI: case llvm::Triple::EABI: - // EABI is always AAPCS, and if it was not marked 'hard', it's softfp - ABI = FloatABI::SoftFP; + // Gentoo puts "hardfloat" in vendor field instead of using *hf + // environment variant. + if (Triple.getVendorName() == "hardfloat") + ABI = FloatABI::Hard; + else // EABI is always AAPCS, and if it was not marked 'hard', it's softfp + ABI = FloatABI::SoftFP; break; case llvm::Triple::Android: ABI = (SubArch == 7) ? FloatABI::SoftFP : FloatABI::Soft; --