[PATCH] D32427: Fix float abi for SUSE ARM triples

İsmail Dönmez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 24 05:03:47 PDT 2017


ismail updated this revision to Diff 96382.
ismail added a comment.

Fix typo


https://reviews.llvm.org/D32427

Files:
  lib/Driver/ToolChains/Arch/ARM.cpp
  test/Driver/linux-as.c


Index: test/Driver/linux-as.c
===================================================================
--- test/Driver/linux-as.c
+++ test/Driver/linux-as.c
@@ -174,3 +174,9 @@
 // RUN:   -no-integrated-as -c %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s
 // CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196"
+//
+// RUN: %clang -target armv7hl-suse-linux-gnueabi -### \
+// RUN:   -no-integrated-as -c %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-SUSE-ARMV7 %s
+// CHECK-SUSE-ARMV7: as{{.*}}" "-mfloat-abi=hard"
+
Index: lib/Driver/ToolChains/Arch/ARM.cpp
===================================================================
--- lib/Driver/ToolChains/Arch/ARM.cpp
+++ lib/Driver/ToolChains/Arch/ARM.cpp
@@ -227,6 +227,10 @@
     }
   }
 
+  // SUSE triples end with -gnueabi but all targets are hard-float
+  if (Triple.getVendor() == llvm::Triple::SUSE)
+      ABI = FloatABI::Hard;
+
   assert(ABI != FloatABI::Invalid && "must select an ABI");
   return ABI;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32427.96382.patch
Type: text/x-patch
Size: 982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170424/1a673877/attachment.bin>


More information about the cfe-commits mailing list