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
This commit is contained in:
Neil Booth 2003-05-17 21:57:38 +00:00 committed by Neil Booth
parent 3af15d5869
commit a7fbe40472
9 changed files with 91 additions and 34 deletions

View 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

View 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. */

View 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

View File

@ -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

View 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)");

View File

@ -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. */

View 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

View 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}"

View 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)