]> granicus.if.org Git - clang/commitdiff
Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.
authorTim Northover <tnorthover@apple.com>
Mon, 11 Nov 2013 19:11:22 +0000 (19:11 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 11 Nov 2013 19:11:22 +0000 (19:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194408 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Preprocessor/init.c

index 17d75e2c32ace9d0ba4052b5926e54d35ab89fe1..42d48ea48d9f87e4f70d72cd62e530c5d11ec3bc 100644 (file)
@@ -3956,8 +3956,8 @@ public:
       Builder.defineMacro("__THUMB_INTERWORK__");
 
     if (ABI == "aapcs" || ABI == "aapcs-linux" || ABI == "aapcs-vfp") {
-      // M-class CPUs on Darwin follow AAPCS, but not EABI.
-      if (!(getTriple().isOSDarwin() && CPUProfile == "M"))
+      // Embedded targets on Darwin follow AAPCS, but not EABI.
+      if (!getTriple().isOSDarwin())
         Builder.defineMacro("__ARM_EABI__");
       Builder.defineMacro("__ARM_PCS", "1");
 
index 58ae151832acf4ae70a1fa434cc92108b92ee0dc..8486e94b3a73c9a99c8be1eb1661f9015b681bc8 100644 (file)
 // ARMEABIHARDFP:#define __arm 1
 // ARMEABIHARDFP:#define __arm__ 1
 
+// RUN: %clang -target arm -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
+// RUN: %clang -target arm -arch armv6m -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
+// RUN: %clang -target arm -arch armv7m -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
+// RUN: %clang -target arm -arch armv7em -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
+// RUN: %clang -target thumbv7-apple-darwin-eabi -arch armv7 -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
+// ARM-DARWIN-NO-EABI-NOT: #define __ARM_EABI__ 1
+
 // Check that -mhwdiv works properly for targets which don't have the hwdiv feature enabled by default.
 
 // RUN: %clang -target arm -mhwdiv=arm -x c -E -dM %s -o - | FileCheck --check-prefix=ARMHWDIV-ARM %s