From 857225d3324ebc6e9869eaf50301bf24b282a8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 17 Oct 2016 18:22:43 +0200 Subject: [PATCH] [Driver] Support "hardfloat" vendor triples used by Gentoo --- lib/Driver/Tools.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index b7a323f..ba123c9 100644 --- a/lib/Driver/Tools.cpp +++ b/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; -- 2.10.1