aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m68k
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-05-17 21:57:38 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-05-17 21:57:38 +0000
commita7fbe4047277456f5afaaa9fa6ff13e77499d853 (patch)
treefb49fa69db28a8a4a53aae01b322906a913f60be /gcc/config/m68k
parent3af15d5869dbf5212ada3c473a127a283cd8a417 (diff)
downloadgcc-a7fbe4047277456f5afaaa9fa6ff13e77499d853.zip
gcc-a7fbe4047277456f5afaaa9fa6ff13e77499d853.tar.gz
gcc-a7fbe4047277456f5afaaa9fa6ff13e77499d853.tar.bz2
hp320.h, [...]: Remove CPP_PREDEFINES...
* 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
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r--gcc/config/m68k/hp320.h19
-rw-r--r--gcc/config/m68k/linux.h16
-rw-r--r--gcc/config/m68k/m68k-none.h5
-rw-r--r--gcc/config/m68k/m68k.h16
-rw-r--r--gcc/config/m68k/m68kemb.h11
-rw-r--r--gcc/config/m68k/m68kv4.h20
-rw-r--r--gcc/config/m68k/openbsd.h14
-rw-r--r--gcc/config/m68k/rtemself.h17
8 files changed, 84 insertions, 34 deletions
diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h
index 63bf42d..0ce72a9 100644
--- a/gcc/config/m68k/hp320.h
+++ b/gcc/config/m68k/hp320.h
@@ -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. */
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index 7a90756..168fca3 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -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
diff --git a/gcc/config/m68k/m68k-none.h b/gcc/config/m68k/m68k-none.h
index eb9cdae..0c9514b 100644
--- a/gcc/config/m68k/m68k-none.h
+++ b/gcc/config/m68k/m68k-none.h
@@ -87,11 +87,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
#endif
#endif
-/* 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
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 383dbb9..f0f3a16 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -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)");
diff --git a/gcc/config/m68k/m68kemb.h b/gcc/config/m68k/m68kemb.h
index 623a64c5..231ad06 100644
--- a/gcc/config/m68k/m68kemb.h
+++ b/gcc/config/m68k/m68kemb.h
@@ -41,9 +41,14 @@
#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. */
diff --git a/gcc/config/m68k/m68kv4.h b/gcc/config/m68k/m68kv4.h
index 28696f3..66de391 100644
--- a/gcc/config/m68k/m68kv4.h
+++ b/gcc/config/m68k/m68kv4.h
@@ -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
diff --git a/gcc/config/m68k/openbsd.h b/gcc/config/m68k/openbsd.h
index baa4ef0..be185db 100644
--- a/gcc/config/m68k/openbsd.h
+++ b/gcc/config/m68k/openbsd.h
@@ -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}"
diff --git a/gcc/config/m68k/rtemself.h b/gcc/config/m68k/rtemself.h
index eb627f6..393f96a 100644
--- a/gcc/config/m68k/rtemself.h
+++ b/gcc/config/m68k/rtemself.h
@@ -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)