[PATCH] D27362: [Triple] Support parsing Gentoo ARM triples, with hardfloat in vendor

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 20:43:04 PST 2016


compnerd added a comment.

As it is, `arm-unknown-linux-gnueabi -mfloat-abi=hard` and `arm-unknown-linux-gnueabihf` have differences.  We need to identify the calling convention in the backend when generating calls to builtins.  Adding yet another mechanism really complicates the situation.

If really your issue is backwards compatibility ... provide a wrapper that canonicalizes the triple.  Its not particularly pretty, but it would allow you to prevent the intermittent break.



================
Comment at: include/llvm/ADT/Triple.h:145
+    HardFloat,
+    LastVendorType = HardFloat
   };
----------------
Why do these need to be vendors?  There already are two different ways to specify the hard float and soft float conventions.  Please don't introduce a third.


================
Comment at: lib/Support/Triple.cpp:513
+  // Gentoo abuses the vendor field for softfloat/hardfloat ARM
+  // e.g. arm-softfloat-linux-gnueabi, arm-hardfloat-linux-gnueabi
+  if (Vendor == Triple::HardFloat) {
----------------
What happens if someone wants to vend a Gentoo based OS with hard float?

  arm-gentoo_is_broken-hardfloat-linux-gnueabi

Ive complained to steev about this in the past.


https://reviews.llvm.org/D27362





More information about the llvm-commits mailing list