This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Remove a bunch of CPP_PREDEFINES


I've compiled one of each of the relevant targets (except frv,
which suffers from use of poisoned identifiers).

OK to apply?

Neil.

	* config/frv/frv.h: Use TARGET_CPU_CPP_BUILTINS, not CPP_PREDEFINES.
	* config/ip2k/ip2k.h: Similarly.
	* config/m32r/m32r.h: Similarly.
	* config/m68hc11/m68hc11.h: Similarly.
	* config/mn10200/mn10200.h: Similarly.
	* config/mn10300/mn10300.h: Similarly.
	* config/pdp11/pdp11.h: Similarly.
	* config/v850/v850.h: Similarly.
	* config/rs6000/vxworks.h: Similarly for TARGET_OS_CPP_BUILTINS.
	* config/v850/retms.h: Similarly for TARGET_OS_CPP_BUILTINS.
	* config/mips/iris3.h: Remove #if 0 block.

============================================================
Index: gcc/config/frv/frv.h
--- gcc/config/frv/frv.h	19 Feb 2003 18:03:09 -0000	1.17
+++ gcc/config/frv/frv.h	9 Mar 2003 21:06:26 -0000
@@ -280,16 +280,13 @@
 
 /* Run-time target specifications */
 
-/* Define this to be a string constant containing `-D' options to define the
-   predefined macros that identify this machine and system.  These macros will
-   be predefined unless the `-ansi' option is specified.
-
-   In addition, a parallel set of macros are predefined, whose names are made
-   by appending `__' at the beginning and at the end.  These `__' macros are
-   permitted by the ANSI standard, so they are predefined regardless of whether
-   `-ansi' is specified.  */
-
-#define CPP_PREDEFINES "-D__frv__ -Amachine(frv)"
+#define TARGET_CPU_CPP_BUILTINS()			\
+  do						\
+    {						\
+      builtin_define ("__frv__");		\
+      builtin_assert ("machine=frv");		\
+    }						\
+  while (0)
 
 
 /* This declaration should be present.  */
============================================================
Index: gcc/config/ip2k/ip2k.h
--- gcc/config/ip2k/ip2k.h	28 Jan 2003 18:08:51 -0000	1.19
+++ gcc/config/ip2k/ip2k.h	9 Mar 2003 21:06:27 -0000
@@ -27,26 +27,15 @@ Boston, MA 02111-1307, USA.  */
 #include "elfos.h"
 #undef ASM_SPEC			/* But we have a GAS assembler.  */
 
-#define CPP_PREDEFINES \
-  "-DIP2K -D_DOUBLE_IS_32BITS -D__BUFSIZ__=512 -D__FILENAME_MAX__=128"
-/* Define this to be a string constant containing `-D' options to
-   define the predefined macros that identify this machine and system.
-   These macros will be predefined unless the `-ansi' option is
-   specified.
-
-   In addition, a parallel set of macros are predefined, whose names
-   are made by appending `__' at the beginning and at the end.  These
-   `__' macros are permitted by the ANSI standard, so they are
-   predefined regardless of whether `-ansi' is specified.
-
-   For example, on the Sun, one can use the following value:
-
-   "-Dmc68000 -Dsun -Dunix"
-
-   The result is to define the macros `__mc68000__', `__sun__' and
-   `__unix__' unconditionally, and the macros `mc68000', `sun' and
-   `unix' provided `-ansi' is not specified.  */
-
+#define TARGET_CPU_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define_std ("IP2K");		\
+      builtin_define ("_DOUBLE_IS_32BITS");	\
+      builtin_define ("_BUFSIZ=512");		\
+      builtin_define ("__FILENAME_MAX__=128");	\
+    }						\
+  while (0)
 
 /* This declaration should be present.  */
 extern int target_flags;
============================================================
Index: gcc/config/m32r/m32r.h
--- gcc/config/m32r/m32r.h	28 Jan 2003 18:08:51 -0000	1.77
+++ gcc/config/m32r/m32r.h	9 Mar 2003 21:06:27 -0000
@@ -105,7 +105,14 @@ Boston, MA 02111-1307, USA.  */
 
 /* Names to predefine in the preprocessor for this target machine.  */
 /* __M32R__ is defined by the existing compiler so we use that.  */
-#define CPP_PREDEFINES "-Acpu=m32r -Amachine=m32r -D__M32R__"
+#define TARGET_CPU_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define ("__M32R__");		\
+      builtin_assert ("cpu=m32r");		\
+      builtin_assert ("machine=m32r");		\
+    }						\
+  while (0)
 
 /* This macro defines names of additional specifications to put in the specs
    that can be used in various specifications like CC1_SPEC.  Its definition
============================================================
Index: gcc/config/m68hc11/m68hc11.h
--- gcc/config/m68hc11/m68hc11.h	5 Mar 2003 21:32:11 -0000	1.64
+++ gcc/config/m68hc11/m68hc11.h	9 Mar 2003 21:06:28 -0000
@@ -84,7 +84,12 @@ Note:
 #define STARTFILE_SPEC "crt1%O%s"
 
 /* Names to predefine in the preprocessor for this target machine.  */
-#define CPP_PREDEFINES		"-Dmc68hc1x"
+#define TARGET_CPU_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define_std ("mc68hc1x");		\
+    }						\
+  while (0)
 
 /* As an embedded target, we have no libc.  */
 #define inhibit_libc
============================================================
Index: gcc/config/mips/iris3.h
--- gcc/config/mips/iris3.h	29 Jul 2002 22:21:41 -0000	1.5
+++ gcc/config/mips/iris3.h	9 Mar 2003 21:06:28 -0000
@@ -20,16 +20,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define SGI_TARGET 1		/* inform other mips files this is SGI */
 
-/* Names to predefine in the preprocessor for this target machine.  */
-/* Temporarily #if 0'd until Irix header consolidation.  */
-#if 0
-#define CPP_PREDEFINES	"\
--Dunix -Dmips -Dsgi -DSVR3 -Dhost_mips -DMIPSEB -DSYSTYPE_SYSV \
--Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips"
-#define SUBTARGET_CPP_SPEC "\
-%{!ansi:-D__EXTENSIONS__} -D_MIPSEB -D_SYSTYPE_SYSV"
-#endif
-
 #define STARTFILE_SPEC	"%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
 #define LIB_SPEC	\
 	"%{!p:%{!pg:%{!static:%{!g*:-lc_s}} -lc}}%{p:-lc_p}%{pg:-lc_p} crtn.o%s"
============================================================
Index: gcc/config/mn10200/mn10200.h
--- gcc/config/mn10200/mn10200.h	28 Jan 2003 04:46:30 -0000	1.45
+++ gcc/config/mn10200/mn10200.h	9 Mar 2003 21:06:28 -0000
@@ -32,7 +32,13 @@ Boston, MA 02111-1307, USA.  */
 
 /* Names to predefine in the preprocessor for this target machine.  */
 
-#define CPP_PREDEFINES "-D__mn10200__ -D__MN10200__"
+#define TARGET_CPU_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define ("__mn10200__");		\
+      builtin_define ("__MN10200__");		\
+    }						\
+  while (0)
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
 
============================================================
Index: gcc/config/mn10300/mn10300.h
--- gcc/config/mn10300/mn10300.h	28 Jan 2003 18:08:53 -0000	1.68
+++ gcc/config/mn10300/mn10300.h	9 Mar 2003 21:06:29 -0000
@@ -33,7 +33,13 @@ Boston, MA 02111-1307, USA.  */
 
 /* Names to predefine in the preprocessor for this target machine.  */
 
-#define CPP_PREDEFINES "-D__mn10300__ -D__MN10300__"
+#define TARGET_CPU_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define ("__mn10300__");		\
+      builtin_define ("__MN10300__");		\
+    }						\
+  while (0)
 
 #define CPP_SPEC "%{mam33:-D__AM33__}"
 
============================================================
Index: gcc/config/pdp11/pdp11.h
--- gcc/config/pdp11/pdp11.h	28 Jan 2003 04:46:30 -0000	1.48
+++ gcc/config/pdp11/pdp11.h	9 Mar 2003 21:06:29 -0000
@@ -30,7 +30,12 @@ Boston, MA 02111-1307, USA.  */
 
 /* Names to predefine in the preprocessor for this target machine.  */
 
-#define CPP_PREDEFINES "-Dpdp11"
+#define TARGET_CPU_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define_std ("pdp11");		\
+    }						\
+  while (0)
 
 /* Print subsidiary information on the compiler version in use.  */
 #define TARGET_VERSION fprintf (stderr, " (pdp11)");
============================================================
Index: gcc/config/rs6000/vxworks.h
--- gcc/config/rs6000/vxworks.h	16 Dec 2002 18:21:51 -0000	1.2
+++ gcc/config/rs6000/vxworks.h	9 Mar 2003 21:06:29 -0000
@@ -18,11 +18,14 @@ along with GNU CC; see the file COPYING.
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* N.B. Only big endian PPC is supported by VxWorks.  */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES \
-  "-D__vxworks -D__vxworks__ -D_BIG_ENDIAN -D__BIG_ENDIAN__"
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define ("__vxworks");		\
+      builtin_define ("__vxworks__");		\
+    }						\
+  while (0)
 
 /* We have to kill off the entire specs set created by rs6000/sysv4.h
    and substitute our own set.  The top level vxworks.h has done some
============================================================
Index: gcc/config/v850/rtems.h
--- gcc/config/v850/rtems.h	12 Apr 2002 13:35:03 -0000	1.4
+++ gcc/config/v850/rtems.h	9 Mar 2003 21:06:29 -0000
@@ -20,7 +20,7 @@ the Free Software Foundation, 59 Temple 
 Boston, MA 02111-1307, USA.  */
 
 /* Specify predefined symbols in preprocessor.  */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__v851__ -D__v850 -D__rtems__ \
-  -Asystem=rtems -Acpu=v850 -Amachine=v850"
+#define TARGET_OS_CPP_BUILTINS() do {		\
+  builtin_define( "__rtems__" );		\
+  builtin_assert( "system=rtems" );		\
+} while (0)
============================================================
Index: gcc/config/v850/v850.h
--- gcc/config/v850/v850.h	28 Jan 2003 18:08:55 -0000	1.79
+++ gcc/config/v850/v850.h	9 Mar 2003 21:06:30 -0000
@@ -65,7 +65,12 @@
  { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC } 
 
 /* Names to predefine in the preprocessor for this target machine.  */
-#define CPP_PREDEFINES "-D__v851__ -D__v850"
+#define TARGET_CPU_CPP_BUILTINS() do {		\
+  builtin_define( "__v851__" );			\
+  builtin_define( "__v850" );			\
+  builtin_assert( "machine=v850" );		\
+  builtin_assert( "cpu=v850" );			\
+} while(0)
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]