@@ -, +, @@ --- lib/Support/Triple.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/lib/Support/Triple.cpp +++ a/lib/Support/Triple.cpp @@ -874,6 +874,14 @@ std::string Triple::normalize(StringRef Str) { } } + // Gentoo abuses the vendor field for softfloat/hardfloat ARM + // e.g. arm-softfloat-linux-gnueabi, arm-hardfloat-linux-gnueabi + if (Arch == Triple::arm && Environment == Triple::GNUEABI && + Components[1] == "hardfloat") { + Components[3] = "gnueabihf"; + Environment = Triple::GNUEABIHF; + } + // Stick the corrected components back together to form the normalized string. std::string Normalized; for (unsigned i = 0, e = Components.size(); i != e; ++i) { --