arc.h (CPP_PREDEFINES): Remove.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Thu, 16 May 2002 06:04:34 +0000 (06:04 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Thu, 16 May 2002 06:04:34 +0000 (06:04 +0000)
* config/arc/arc.h (CPP_PREDEFINES): Remove.
(CPP_SPEC): Update.
(TARGET_CPU_CPP_BUILTINS): New.

From-SVN: r53510

gcc/ChangeLog
gcc/config/arc/arc.h

index 820122e0e5826ee7fb4668366529b5627ddb8064..bf23d0fe43fc72b08bcbe1a387bc4f7405180d39 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-16  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * config/arc/arc.h (CPP_PREDEFINES): Remove.
+       (CPP_SPEC): Update.
+       (TARGET_CPU_CPP_BUILTINS): New.
+
 2002-05-16  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cpphash.h (cpp_macro): Move here, and make expansion a union.
index 651d81ec92dd223149e9678e3d7dbca3a06abfed..bb04f2cf0fa7f02fa4c3ee99bda4028f6a401b0a 100644 (file)
@@ -43,13 +43,17 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_VERSION fprintf (stderr, " (arc)")
 
 /* Names to predefine in the preprocessor for this target machine.  */
-#define CPP_PREDEFINES "-Acpu=arc -Amachine=arc -D__arc__"
-
-/* Additional flags for the preprocessor.  */
-#define CPP_SPEC "\
-%{!mcpu=*:-D__base__} %{mcpu=base:-D__base__} \
-%{EB:-D__big_endian__} \
-"
+#define TARGET_CPU_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+       builtin_define ("__arc__");             \
+       if (TARGET_BIG_ENDIAN)                  \
+         builtin_define ("__big_endian__");    \
+       if (arc_cpu_type == 0)                  \
+         builtin_define ("__base__");          \
+       builtin_assert ("cpu=arc");             \
+       builtin_assert ("machine=arc");         \
+    } while (0)
 
 /* Pass -mmangle-cpu if we get -mcpu=*.
    Doing it this way lets one have it on as default with -mcpu=*,