]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aix.h: Convert CPP_PREDEFINES to TARGET_OS_CPP_BUILTINS.
authorMatt Kraai <kraai@alumni.cmu.edu>
Wed, 10 Jul 2002 00:33:52 +0000 (00:33 +0000)
committerMatt Kraai <kraai@gcc.gnu.org>
Wed, 10 Jul 2002 00:33:52 +0000 (00:33 +0000)
* 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

17 files changed:
gcc/ChangeLog
gcc/config/rs6000/aix.h
gcc/config/rs6000/aix31.h
gcc/config/rs6000/aix41.h
gcc/config/rs6000/aix43.h
gcc/config/rs6000/aix51.h
gcc/config/rs6000/beos.h
gcc/config/rs6000/darwin.h
gcc/config/rs6000/eabi.h
gcc/config/rs6000/eabisim.h
gcc/config/rs6000/linux.h
gcc/config/rs6000/linux64.h
gcc/config/rs6000/lynx.h
gcc/config/rs6000/mach.h
gcc/config/rs6000/rtems.h
gcc/config/rs6000/sysv4.h
gcc/config/rs6000/vxppc.h

index 19f2df7fc82e03fb67c105e9453999cf35d85dd9..47805c96fcde6fa583d50b6ea52e907f2b486419 100644 (file)
@@ -1,3 +1,22 @@
+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.
index 7c0a4cf41b23e6b6b8a548d3ede372a043bef176..5e619e64d05f4860cc610f217e90cb54c07e5961 100644 (file)
@@ -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.  */
index 688e588dc561f435e94820928fc62c7e886f6146..f390addb6e7568494c5bd4bc4a8efae36a83ca2f 100644 (file)
@@ -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
index cc839b2c4945ee8c4d57e426c1d2e601f79ca056..7f23a48a4a9b9138f367f62dec1e8fc02f821da5 100644 (file)
@@ -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}\
index ddf9857d9c20c52e78509545d0dcce78cd7a742d..bcbfcf2b2574c2ca772ae173212cc040f785f54a 100644 (file)
@@ -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}\
index 2f0d68274f95ce972f6de80a11873d2664a5aeb7..552394e2635c58be88e762fcba715d3fa61ed185 100644 (file)
@@ -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}    \
index 4d2952a10aa5744fbcf8c0e983c799d253e3a22e..1f788c31c25ca631ebe24d4fefe7a557777279a1 100644 (file)
@@ -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}"
index a472334b7b0824428f0afa15e53f608f290c3263..f874354634bd3a02b5e13778ff9de21b5f42c137 100644 (file)
@@ -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.  */
index 88fb6f8daaa6738e5f87ddff43ea9ada288edc54..fd41177ea33a54431b1cdcb6f23fbecb49ed6d4f 100644 (file)
@@ -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)
index 92e09575f97917269e51dbaed392b1e9db4163ad..00f710e5cb4a4ef49d63d07d82232cc5a8a0e563 100644 (file)
@@ -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
index 99c04536489395b5a79e65f30c8d6fc674eebfa6..0beaa618d947aa11893daa5c1245408a3cbfbbe2 100644 (file)
@@ -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)"
index eaa962d024df32713ab52cc2dfc9b80f55d1913b..192e6cc98532aea8906240cde196e9b967456f6f 100644 (file)
@@ -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)"
index fb45997a48665b5990a6c4c9832221a96ac331ef..7878ef94a1754e465a8ce3c1e7aacbcf117304fb 100644 (file)
@@ -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*}"
index d4395d545c095b1149d9027f3ba1b836598c9629..a246f91fdab2725e0c6d4fbae68322fb27d34e5a 100644 (file)
@@ -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
index aa68130ba17e6ad4d8c388914cc74f6808554e5a..072d86c4ca284a730c40628862c0456cbcf1644d 100644 (file)
@@ -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)
index bb8538540d801294fa72ab95ae24bbb1738bd482..4433936625320d3b6184964964bf72349f27df63 100644 (file)
@@ -808,9 +808,19 @@ do {                                               \
 #define        TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
 #endif
 \f
-#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.  */
index 79c63eaa26c240778f740630df196bf28d2cc26a..91250a6890945a47db5699a357a4a2fa68f38be6 100644 (file)
@@ -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