[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:12 PDT 2017
ismail created this revision.
Herald added a subscriber: aemerson.
SUSE's ARM triples always ends with -gnueabi but all the targets are hard-float
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 ends 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.96381.patch
Type: text/x-patch
Size: 983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170424/ae251c64/attachment.bin>
More information about the cfe-commits
mailing list