On FreeBSD when we build ARM EABI elf files with clang the EABI version
bits in elf flags field are unset. According the the ABI documentation
this indicates an unknown conformance level.
The attached patch sets the EABI value to the same as if the LLVM
integrated assembler was used, i.e. 5. It also updates the FreeBSD
Driver test to check the value is set.
Andrew
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 177228)
+++ lib/Driver/Tools.cpp (working copy)
@@ -5216,6 +5216,7 @@
switch(getToolChain().getTriple().getEnvironment()) {
case llvm::Triple::GNUEABI:
case llvm::Triple::EABI:
+ CmdArgs.push_back("-meabi=5");
break;
default:
Index: test/Driver/freebsd.c
===================================================================
--- test/Driver/freebsd.c (revision 177228)
+++ test/Driver/freebsd.c (working copy)
@@ -105,5 +105,5 @@
// RUN: %clang %s -### -o %t.o -target arm-gnueabi-freebsd10.0 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ARM-EABI %s
// CHECK-ARM-EABI-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions"
-// CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp"
+// CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp" "-meabi=5"
// CHECK-ARM-EABI-NOT: as{{.*}}" "-matpcs"
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits