hp320.h, [...]: Remove CPP_PREDEFINES...
authorNeil Booth <neil@daikokuya.co.uk>
Sat, 17 May 2003 21:57:38 +0000 (21:57 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 17 May 2003 21:57:38 +0000 (21:57 +0000)
* config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68k-none.h,
config/m68k/m68k.h, config/m68k/m68kemb.h, config/m68k/m68kv4.h,
config/m68k/openbsd.h, config/m68k/rtemself.h: Remove CPP_PREDEFINES,
use TARGET_OS_CPP_BUILTINS and TARGET_CPU_CPP_BUILTINS instead.

From-SVN: r66916

gcc/ChangeLog
gcc/config/m68k/hp320.h
gcc/config/m68k/linux.h
gcc/config/m68k/m68k-none.h
gcc/config/m68k/m68k.h
gcc/config/m68k/m68kemb.h
gcc/config/m68k/m68kv4.h
gcc/config/m68k/openbsd.h
gcc/config/m68k/rtemself.h

index f5fa1085dcb71be83110ad9f5ae35b937c514f8b..07f3c5cae49f220d0cc1e4ef42b45c3f2c05ab7a 100644 (file)
@@ -1,3 +1,10 @@
+2003-05-17  Neil Booth  <neil@daikokuya.co.uk>
+
+       * config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68k-none.h,
+       config/m68k/m68k.h, config/m68k/m68kemb.h, config/m68k/m68kv4.h,
+       config/m68k/openbsd.h, config/m68k/rtemself.h: Remove CPP_PREDEFINES,
+       use TARGET_OS_CPP_BUILTINS and TARGET_CPU_CPP_BUILTINS instead.
+
 2003-05-17  Neil Booth  <neil@daikokuya.co.uk>
 
        PR c/9209
index 63bf42dc60a0b77227aba61e3a14f1e7190f3a92..0ce72a98f907d15db24b6c78372100d1a1298aba 100644 (file)
@@ -125,12 +125,21 @@ Boston, MA 02111-1307, USA.  */
 /* Translate -static for HPUX linker.  */
 #define LINK_SPEC "%{static:-a archive}"
 
-/* Names to predefine in the preprocessor for this target machine
-   (for non-strict-ANSI programs only).  */
-/* These are the ones defined by HPUX cc, plus mc68000 for uniformity with
-   GCC on other 68000 systems.  */
 
-#define CPP_PREDEFINES "-Dhp9000s200 -Dhp9000s300 -DPWB -Dhpux -Dunix -D__hp9000s300 -D__hp9000s200 -D__PWB -D__hpux -D__unix -D__motorola__ -Asystem=unix -Asystem=hpux -Acpu=m68k -Amachine=m68k"
+/* Target OS builtins.  These are the ones defined by HPUX cc.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("hp9000s200");      \
+       builtin_define_std ("hp9000s300");      \
+       builtin_define_std ("hpux");            \
+       builtin_define_std ("unix");            \
+       builtin_define_std ("PWB");             \
+       builtin_define ("__motorola__");        \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=hpux");         \
+    }                                          \
+  while (0)
 
 /* Every structure or union's size must be a multiple of 2 bytes.  */
 
index 7a90756839f1bf71ee2e885f5eabc27d7469b69b..168fca3d50b88b50db9d5ef6156bfb05e0438a20 100644 (file)
@@ -97,8 +97,20 @@ Boston, MA 02111-1307, USA.  */
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE BITS_PER_WORD
 
-#define CPP_PREDEFINES \
-  "-D__ELF__ -Dunix -Dmc68000 -Dmc68020 -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix -Acpu=m68k -Amachine=m68k"
+/* Target OS builtins.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("mc68000");         \
+       builtin_define_std ("mc68020");         \
+       builtin_define_std ("linux");           \
+       builtin_define_std ("unix");            \
+       builtin_define ("__gnu_linux__");       \
+       builtin_define ("__ELF__");             \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=posix");        \
+   }                                           \
+  while (0)
 
 #undef CPP_SPEC
 #ifdef USE_GNULIBC_1
index eb9cdae2ed1f2e795de2378e42ed5e8a9dbd06a5..0c9514b89ca6890e8df9e3fffca8f8d4b4db7534 100644 (file)
@@ -87,11 +87,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
 #endif
 #endif
 \f
-/* Always define mc68000.
-   Remember that GCC will automatically add __mc68000 and __mc68000__.  */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dmc68000"
-
 /* Define __HAVE_68881__ or nothing (soft float), appropriately.  */
 #undef CPP_FPU_SPEC
 #if TARGET_DEFAULT & MASK_68881
index 383dbb976cb56b1f2d20bd47f7def298419d7310..f0f3a166676ed5be8c56d49ab4ee47a9882769e9 100644 (file)
@@ -24,6 +24,18 @@ Boston, MA 02111-1307, USA.  */
 /* Note that some other tm.h files include this one and then override
    many of the definitions that relate to assembler syntax.  */
 
+/* Target CPU builtins.  */
+#define TARGET_CPU_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+       builtin_define ("__mc68000__");         \
+       builtin_define ("__mc68020__");         \
+       builtin_define ("__m68k__");            \
+       builtin_assert ("cpu=m68k");            \
+       builtin_assert ("machine=m68k");        \
+    }                                          \
+  while (0)
+
 
 /* Classify the groups of pseudo-ops used to assemble QI, HI and SI
    quantities.  */
@@ -35,10 +47,6 @@ Boston, MA 02111-1307, USA.  */
 /* Set the default */
 #define INT_OP_GROUP INT_OP_DOT_WORD
 
-/* Names to predefine in the preprocessor for this target machine.  */
-
-/* See sun3.h, sun2.h, isi.h for different CPP_PREDEFINES.  */
-
 /* Print subsidiary information on the compiler version in use.  */
 #ifdef MOTOROLA
 #define TARGET_VERSION fprintf (stderr, " (68k, Motorola syntax)");
index 623a64c521b5650d10552d5e3113cedc10547c68..231ad06bd9bb1792886ccf2936e5dae052efcc72 100644 (file)
 #undef NEEDS_UNTYPED_CALL
 #define NEEDS_UNTYPED_CALL 1
 
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dmc68000 -D__embedded__ -Asystem=embedded \
-  -Amachine=mc68000"
+/* Target OS builtins.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("mc68000");         \
+       builtin_define ("__embedded__");        \
+   }                                           \
+  while (0)
 
 /* Override the default LIB_SPEC from gcc.c.  We don't currently support
    profiling, or libg.a.  */
index 28696f313774832146f212bd3a80808e54093679..66de39168b724f113a56c4263e282b064172890e 100644 (file)
@@ -21,6 +21,19 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+/* Target OS builtins.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("unix");            \
+       builtin_define_std ("m68k");            \
+       builtin_define ("__svr4__");            \
+       builtin_define ("__motorola__");        \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=svr4");         \
+   }                                           \
+  while (0)
+
 /* Use SGS_* macros to control compilation in m68k.md */
 
 #define SGS_SWITCH_TABLES      /* Different switch table handling */
@@ -56,13 +69,6 @@ Boston, MA 02111-1307, USA.  */
 
 #undef PCC_STATIC_STRUCT_RETURN
 
-/* Provide a set of pre-definitions and pre-assertions appropriate for
-   the m68k running svr4.  __svr4__ is our extension.  */
-
-#define CPP_PREDEFINES \
-  "-Dm68k -Dunix -D__svr4__ -D__motorola__ \
- -Asystem=unix -Asystem=svr4 -Acpu=m68k -Amachine=m68k"
-
 /* Test to see if the target includes a 68881 by default, and use CPP_SPEC
    to control whether or not __HAVE_68881__ is defined by default or not.
    If a 68881 is the default, gcc will use inline 68881 instructions, by
index baa4ef0928caa3e9a2f46f9469746e2ae7ff4344..be185dbdc86540993a88a59b352b0b840e90547f 100644 (file)
@@ -18,6 +18,17 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+/* Target OS builtins.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define ("__unix__");            \
+       builtin_define ("__OpenBSD__");         \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=OpenBSD");      \
+   }                                           \
+  while (0)
+
 /* m68k is an old configuration that does not yet use the TARGET_CPU_DEFAULT
    framework.  */
 #define TARGET_DEFAULT (MASK_BITFIELD | MASK_68881 | MASK_68020)
@@ -33,9 +44,6 @@ Boston, MA 02111-1307, USA.  */
 #undef CPP_SPEC
 #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
 
-/* Run-time target specifications.  */
-#define CPP_PREDEFINES "-D__unix__ -D__m68k__ -D__mc68000__ -D__mc68020__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=m68k -Amachine=m68k"
-
 /* m68k as needs to know about the processor subtype.  */
 #undef ASM_SPEC
 #define ASM_SPEC "%{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}"
index eb627f6db0112167f334f154ba8017a219178228..393f96ab1e124dc62eb9e292d13f318ede383bc0 100644 (file)
@@ -22,8 +22,15 @@ Boston, MA 02111-1307, USA.  */
 
 #define MOTOROLA       /* Use Motorola syntax rather than MIT.  */
 
-/* Specify predefined symbols in preprocessor.  */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dmc68000 -D__rtems__ -D__ELF__ -D__USE_INIT_FINI__ \
-   -Asystem=rtems -Acpu=mc68000 -Acpu=m68k -Amachine=m68k"
+/* Target OS builtins.  */
+#undef TARGET_OS_CPP_BUILTINS  /* Defined in m68kemb.h.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("mc68000");         \
+       builtin_define ("__USE_INIT_FINI__");   \
+       builtin_define ("__rtems__");           \
+       builtin_define ("__ELF__");             \
+       builtin_assert ("system=rtems");        \
+    }                                          \
+  while (0)