Commit 7990b46f by Matt Kraai Committed by Matt Kraai

aix.h: Convert CPP_PREDEFINES to TARGET_OS_CPP_BUILTINS.

	* config/rs6000/aix.h: Convert CPP_PREDEFINES to
	TARGET_OS_CPP_BUILTINS.
	* config/rs6000/aix31.h: Likewise.
	* config/rs6000/aix41.h: Likewise.
	* config/rs6000/aix43.h: Likewise.
	* config/rs6000/aix51.h: Likewise.
	* config/rs6000/beos.h: Likewise.
	* config/rs6000/darwin.h: Likewise.
	* config/rs6000/eabi.h: Likewise.
	* config/rs6000/eabisim.h: Likewise.
	* config/rs6000/linux.h: Likewise.
	* config/rs6000/linux64.h: Likewise.
	* config/rs6000/lynx.h: Likewise.
	* config/rs6000/mach.h: Likewise.
	* config/rs6000/rtems.h: Likewise.
	* config/rs6000/sysv4.h: Likewise.
	* config/rs6000/vxppc.h: Likewise.

From-SVN: r55356
parent 28a34ec1
2002-07-09 Matt Kraai <kraai@alumni.cmu.edu>
* config/rs6000/aix.h: Convert CPP_PREDEFINES to
TARGET_OS_CPP_BUILTINS.
* config/rs6000/aix31.h: Likewise.
* config/rs6000/aix41.h: Likewise.
* config/rs6000/aix43.h: Likewise.
* config/rs6000/aix51.h: Likewise.
* config/rs6000/beos.h: Likewise.
* config/rs6000/darwin.h: Likewise.
* config/rs6000/eabi.h: Likewise.
* config/rs6000/eabisim.h: Likewise.
* config/rs6000/linux.h: Likewise.
* config/rs6000/linux64.h: Likewise.
* config/rs6000/lynx.h: Likewise.
* config/rs6000/mach.h: Likewise.
* config/rs6000/rtems.h: Likewise.
* config/rs6000/sysv4.h: Likewise.
* config/rs6000/vxppc.h: Likewise.
2002-07-09 Devang Patel <dpatel@apple.com>
* objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch.
......
......@@ -41,8 +41,20 @@ Boston, MA 02111-1307, USA. */
#define LINK_LIBGCC_SPECIAL_1
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_LONG_LONG \
-Asystem=unix -Asystem=aix -Acpu=rs6000 -Amachine=rs6000"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("_IBMR2"); \
builtin_define ("_POWER"); \
builtin_define ("_AIX"); \
builtin_define ("_AIX32"); \
builtin_define ("_LONG_LONG"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=aix"); \
builtin_assert ("cpu=rs6000"); \
builtin_assert ("machine=rs6000"); \
} \
while (0)
/* Define appropriate architecture macros for preprocessor depending on
target switches. */
......
......@@ -60,8 +60,18 @@ Boston, MA 02111-1307, USA. */
}
/* AIX 3.2 defined _AIX32, but older versions do not. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_IBMR2 -D_AIX -Asystem=unix -Asystem=aix -Acpu=rs6000 -Amachine=rs6000"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("_IBMR2"); \
builtin_define ("_AIX"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=aix"); \
builtin_assert ("cpu=rs6000"); \
builtin_assert ("machine=rs6000"); \
} \
while (0)
/* AIX 3.1 uses bit 15 in CROR as the magic nop. */
#undef RS6000_CALL_GLUE
......
......@@ -33,9 +33,20 @@ Boston, MA 02111-1307, USA. */
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mcom"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 \
-D_LONG_LONG -Asystem=unix -Asystem=aix"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("_IBMR2"); \
builtin_define ("_POWER"); \
builtin_define ("_AIX"); \
builtin_define ("_AIX32"); \
builtin_define ("_AIX41"); \
builtin_define ("_LONG_LONG"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=aix"); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
......
......@@ -96,9 +96,21 @@ do { \
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mcom"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 \
-D_LONG_LONG -Asystem=unix -Asystem=aix"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("_IBMR2"); \
builtin_define ("_POWER"); \
builtin_define ("_AIX"); \
builtin_define ("_AIX32"); \
builtin_define ("_AIX41"); \
builtin_define ("_AIX43"); \
builtin_define ("_LONG_LONG"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=aix"); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
......
......@@ -96,9 +96,22 @@ do { \
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mcom"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_LONG_LONG \
-D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -Asystem=unix -Asystem=aix"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("_IBMR2"); \
builtin_define ("_POWER"); \
builtin_define ("_LONG_LONG"); \
builtin_define ("_AIX"); \
builtin_define ("_AIX32"); \
builtin_define ("_AIX41"); \
builtin_define ("_AIX43"); \
builtin_define ("_AIX51"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=aix"); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
......
......@@ -38,9 +38,18 @@ Boston, MA 02111-1307, USA. */
#undef ASM_SPEC
#define ASM_SPEC "-u %(asm_cpu)"
#undef CPP_PREDEFINES
#undef TARGET_OS_CPP_BUILTINS
/* __POWERPC__ must be defined for some header files */
#define CPP_PREDEFINES "-D__BEOS__ -D__POWERPC__ -Asystem=beos -Acpu=powerpc -Amachine=powerpc"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__BEOS__"); \
builtin_define ("__POWERPC__"); \
builtin_assert ("system=beos"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}"
......
......@@ -44,7 +44,16 @@ Boston, MA 02111-1307, USA. */
#define SUBTARGET_OVERRIDE_OPTIONS \
rs6000_altivec_abi = 1;
#define CPP_PREDEFINES "-D__ppc__ -D__POWERPC__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__APPLE__"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__ppc__"); \
builtin_define ("__POWERPC__"); \
builtin_define ("__NATURAL_ALIGNMENT__"); \
builtin_define ("__MACH__"); \
builtin_define ("__APPLE__"); \
} \
while (0)
/* We want -fPIC by default, unless we're using -static to compile for
the kernel or some such. */
......
......@@ -31,6 +31,14 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)");
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-DPPC -D__embedded__ -Asystem=embedded -Acpu=powerpc -Amachine=powerpc"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("PPC"); \
builtin_define ("__embedded__"); \
builtin_assert ("system=embedded"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
......@@ -23,9 +23,19 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC Simulated)");
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-DPPC -D__embedded__ -D__simulator__ -Asystem=embedded -Asystem=simulator -Acpu=powerpc -Amachine=powerpc"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("PPC"); \
builtin_define ("__embedded__"); \
builtin_define ("__simulator__"); \
builtin_assert ("system=embedded"); \
builtin_assert ("system=simulator"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
/* Make the simulator the default */
#undef LIB_DEFAULT_SPEC
......
......@@ -27,9 +27,17 @@ Boston, MA 02111-1307, USA. */
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-DPPC -D__ELF__ -Dpowerpc -Acpu=powerpc -Amachine=powerpc"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("PPC"); \
builtin_define ("__ELF__"); \
builtin_define_std ("powerpc"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
......
......@@ -106,11 +106,20 @@ Boston, MA 02111-1307, USA. */
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-D_PPC_ -D__PPC__ -D_PPC64_ -D__PPC64__ -D__powerpc__ -D__powerpc64__ \
-D_PIC_ -D__PIC__ -D__ELF__ \
-Acpu=powerpc64 -Amachine=powerpc64"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__PPC__"); \
builtin_define ("__PPC64__"); \
builtin_define ("__powerpc__"); \
builtin_define ("__powerpc64__"); \
builtin_define ("__PIC__"); \
builtin_define ("__ELF__"); \
builtin_assert ("cpu=powerpc64"); \
builtin_assert ("machine=powerpc64"); \
} \
while (0)
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
......
......@@ -53,8 +53,22 @@ Boston, MA 02111-1307, USA. */
#undef DEFAULT_SIGNED_CHAR
#define DEFAULT_SIGNED_CHAR 1
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Acpu=rs6000 -Amachine=rs6000 -Asystem=lynx -Asystem=unix -DLynx -D_IBMR2 -Dunix -Drs6000 -Dlynx -DLYNX"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_assert ("cpu=rs6000"); \
builtin_assert ("machine=rs6000"); \
builtin_assert ("system=lynx"); \
builtin_assert ("system=unix"); \
builtin_define_std ("Lynx"); \
builtin_define ("_IBMR2"); \
builtin_define_std ("unix"); \
builtin_define_std ("rs6000"); \
builtin_define_std ("lynx"); \
builtin_define_std ("LYNX"); \
} \
while (0)
#undef LINK_SPEC
#define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}"
......
......@@ -26,8 +26,19 @@ Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (Mach-RS/6000)");
/* We don't define AIX under MACH; instead we define `unix'. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Drios -D_IBMR2 -Dunix -Asystem=unix -Asystem=mach -Acpu=rs6000 -Amachine=rs6000"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("rios"); \
builtin_define ("_IBMR2"); \
builtin_define_std ("unix"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=mach"); \
builtin_assert ("cpu=rs6000"); \
builtin_assert ("machine=rs6000"); \
} \
while (0)
/* Define different binder options for MACH. */
#undef LINK_SPEC
......
......@@ -21,6 +21,14 @@ Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DPPC -D__rtems__ \
-Asystem=rtems -Acpu=powerpc -Amachine=powerpc"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("PPC"); \
builtin_define ("__rtems__"); \
builtin_assert ("system=rtems"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
......@@ -808,9 +808,19 @@ do { \
#define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
#endif
#ifndef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-DPPC -Dunix -D__svr4__ -Asystem=unix -Asystem=svr4 -Acpu=powerpc -Amachine=powerpc"
#ifndef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("PPC"); \
builtin_define_std ("unix"); \
builtin_define ("__svr4__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=svr4"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
#endif
/* Pass various options to the assembler. */
......
......@@ -39,10 +39,18 @@ Boston, MA 02111-1307, USA. */
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_vxworks)"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__vxworks -D__vxworks__ -Asystem=vxworks -Asystem=embedded \
-Acpu=powerpc -Amachine=powerpc"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__vxworks"); \
builtin_define ("__vxworks__"); \
builtin_assert ("system=vxworks"); \
builtin_assert ("system=embedded"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \
} \
while (0)
/* We use stabs-in-elf for debugging */
#undef PREFERRED_DEBUGGING_TYPE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment