This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: convert 32-bit PowerPC GNU/Linux to TARGET_OS_CPP_BUILTINS


On Wed, Jul 03, 2002 at 10:51:19AM -0400, David Edelsohn wrote:
> 	I think it would be much better to convert the entire PowerPC port
> at once instead of each target separately -- that means AIX and VxWorks,
> etc.

OK.  The following patch converts the entire port.  I'm
currently bootstrapping it on powerpc-unknown-linux-gnu.  I'd
appreciate other people testing it on some other PowerPC
platforms.

Matt

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

Index: gcc/config/rs6000/aix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix.h,v
retrieving revision 1.29
diff -c -3 -p -r1.29 aix.h
*** gcc/config/rs6000/aix.h	11 Jun 2002 23:14:47 -0000	1.29
--- gcc/config/rs6000/aix.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 41,48 ****
  #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 appropriate architecture macros for preprocessor depending on
     target switches.  */
--- 41,60 ----
  #define LINK_LIBGCC_SPECIAL_1
  
  /* Names to predefine in the preprocessor for this target machine.  */
! #define TARGET_OS_CPP_BUILTINS()         \
!   do                                     \
!     {                                    \
!       builtin_define_std ("_IBMR2");     \
!       builtin_define_std ("_POWER");     \
!       builtin_define_std ("_AIX");       \
!       builtin_define_std ("_AIX32");     \
!       builtin_define_std ("_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: gcc/config/rs6000/aix31.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix31.h,v
retrieving revision 1.8
diff -c -3 -p -r1.8 aix31.h
*** gcc/config/rs6000/aix31.h	15 Nov 2001 05:21:06 -0000	1.8
--- gcc/config/rs6000/aix31.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 60,67 ****
  }
  
  /* 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"
  
  /* AIX 3.1 uses bit 15 in CROR as the magic nop.  */
  #undef RS6000_CALL_GLUE
--- 60,77 ----
  }
  
  /* AIX 3.2 defined _AIX32, but older versions do not.  */
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()         \
!   do                                     \
!     {                                    \
!       builtin_define_std ("_IBMR2");     \
!       builtin_define_std ("_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: gcc/config/rs6000/aix41.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix41.h,v
retrieving revision 1.16
diff -c -3 -p -r1.16 aix41.h
*** gcc/config/rs6000/aix41.h	11 Jun 2002 23:14:47 -0000	1.16
--- gcc/config/rs6000/aix41.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 33,41 ****
  #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 CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
--- 33,52 ----
  #undef	ASM_DEFAULT_SPEC
  #define ASM_DEFAULT_SPEC "-mcom"
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()         \
!   do                                     \
!     {                                    \
!       builtin_define_std ("_IBMR2");     \
!       builtin_define_std ("_POWER");     \
!       builtin_define_std ("_AIX");       \
!       builtin_define_std ("_AIX32");     \
!       builtin_define_std ("_AIX41");     \
!       builtin_define_std ("_LONG_LONG"); \
!       builtin_assert ("system=unix");    \
!       builtin_assert ("system=aix");     \
!     }                                    \
!   while (0)
  
  #undef CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
Index: gcc/config/rs6000/aix43.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix43.h,v
retrieving revision 1.26
diff -c -3 -p -r1.26 aix43.h
*** gcc/config/rs6000/aix43.h	12 Jun 2002 03:06:25 -0000	1.26
--- gcc/config/rs6000/aix43.h	3 Jul 2002 15:38:09 -0000
*************** do {									\
*** 96,104 ****
  #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 CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
--- 96,116 ----
  #undef	ASM_DEFAULT_SPEC
  #define ASM_DEFAULT_SPEC "-mcom"
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()         \
!   do                                     \
!     {                                    \
!       builtin_define_std ("_IBMR2");     \
!       builtin_define_std ("_POWER");     \
!       builtin_define_std ("_AIX");       \
!       builtin_define_std ("_AIX32");     \
!       builtin_define_std ("_AIX41");     \
!       builtin_define_std ("_AIX43");     \
!       builtin_define_std ("_LONG_LONG"); \
!       builtin_assert ("system=unix");    \
!       builtin_assert ("system=aix");     \
!     }                                    \
!   while (0)
  
  #undef CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
Index: gcc/config/rs6000/aix51.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix51.h,v
retrieving revision 1.15
diff -c -3 -p -r1.15 aix51.h
*** gcc/config/rs6000/aix51.h	12 Jun 2002 03:06:26 -0000	1.15
--- gcc/config/rs6000/aix51.h	3 Jul 2002 15:38:09 -0000
*************** do {									\
*** 96,104 ****
  #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 CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}	\
--- 96,117 ----
  #undef	ASM_DEFAULT_SPEC
  #define ASM_DEFAULT_SPEC "-mcom"
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()         \
!   do                                     \
!     {                                    \
!       builtin_define_std ("_IBMR2");     \
!       builtin_define_std ("_POWER");     \
!       builtin_define_std ("_LONG_LONG"); \
!       builtin_define_std ("_AIX");       \
!       builtin_define_std ("_AIX32");     \
!       builtin_define_std ("_AIX41");     \
!       builtin_define_std ("_AIX43");     \
!       builtin_define_std ("_AIX51");     \
!       builtin_assert ("system=unix");    \
!       builtin_assert ("system=aix");     \
!     }                                    \
!   while (0)
  
  #undef CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}	\
Index: gcc/config/rs6000/beos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/beos.h,v
retrieving revision 1.10
diff -c -3 -p -r1.10 beos.h
*** gcc/config/rs6000/beos.h	11 Jun 2002 23:14:47 -0000	1.10
--- gcc/config/rs6000/beos.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 38,46 ****
  #undef ASM_SPEC
  #define ASM_SPEC "-u %(asm_cpu)"
  
! #undef CPP_PREDEFINES
  /* __POWERPC__ must be defined for some header files */
! #define CPP_PREDEFINES "-D__BEOS__ -D__POWERPC__ -Asystem=beos -Acpu=powerpc -Amachine=powerpc"
  
  #undef CPP_SPEC
  #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}"
--- 38,55 ----
  #undef ASM_SPEC
  #define ASM_SPEC "-u %(asm_cpu)"
  
! #undef TARGET_OS_CPP_BUILTINS
  /* __POWERPC__ must be defined for some header files */
! #define TARGET_OS_CPP_BUILTINS()          \
!   do                                      \
!     {                                     \
!       builtin_define_std ("__BEOS__");    \
!       builtin_define_std ("__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: gcc/config/rs6000/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/darwin.h,v
retrieving revision 1.21
diff -c -3 -p -r1.21 darwin.h
*** gcc/config/rs6000/darwin.h	11 Jun 2002 23:14:47 -0000	1.21
--- gcc/config/rs6000/darwin.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 44,50 ****
  #define SUBTARGET_OVERRIDE_OPTIONS  \
    rs6000_altivec_abi = 1;
  
! #define CPP_PREDEFINES "-D__ppc__ -D__POWERPC__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__APPLE__"
  
  /* We want -fPIC by default, unless we're using -static to compile for
     the kernel or some such.  */
--- 44,59 ----
  #define SUBTARGET_OVERRIDE_OPTIONS  \
    rs6000_altivec_abi = 1;
  
! #define TARGET_OS_CPP_BUILTINS()                    \
!   do                                                \
!     {                                               \
!       builtin_define_std ("__ppc__");               \
!       builtin_define_std ("__POWERPC__");           \
!       builtin_define_std ("__NATURAL_ALIGNMENT__"); \
!       builtin_define_std ("__MACH__");              \
!       builtin_define_std ("__APPLE__");             \
!     }                                               \
!   while (0)
  
  /* We want -fPIC by default, unless we're using -static to compile for
     the kernel or some such.  */
Index: gcc/config/rs6000/eabi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/eabi.h,v
retrieving revision 1.5
diff -c -3 -p -r1.5 eabi.h
*** gcc/config/rs6000/eabi.h	2 Nov 2000 23:29:12 -0000	1.5
--- gcc/config/rs6000/eabi.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 31,36 ****
  #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"
--- 31,44 ----
  #undef TARGET_VERSION
  #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)");
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()           \
!   do                                       \
!     {                                      \
!       builtin_define_std ("PPC");          \
!       builtin_define_std ("__embedded__"); \
!       builtin_assert ("system=embedded");  \
!       builtin_assert ("cpu=powerpc");      \
!       builtin_assert ("machine=powerpc");  \
!     }                                      \
!   while (0)
Index: gcc/config/rs6000/eabisim.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/eabisim.h,v
retrieving revision 1.4
diff -c -3 -p -r1.4 eabisim.h
*** gcc/config/rs6000/eabisim.h	2 Nov 2000 23:29:12 -0000	1.4
--- gcc/config/rs6000/eabisim.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 23,31 ****
  #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"
  
  /* Make the simulator the default */
  #undef	LIB_DEFAULT_SPEC
--- 23,41 ----
  #undef TARGET_VERSION
  #define TARGET_VERSION fprintf (stderr, " (PowerPC Simulated)");
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()            \
!   do                                        \
!     {                                       \
!       builtin_define_std ("PPC");           \
!       builtin_define_std ("__embedded__");  \
!       builtin_define_std ("__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: gcc/config/rs6000/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux.h,v
retrieving revision 1.31
diff -c -3 -p -r1.31 linux.h
*** gcc/config/rs6000/linux.h	3 Dec 2001 00:49:41 -0000	1.31
--- gcc/config/rs6000/linux.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 27,35 ****
  #undef MD_EXEC_PREFIX
  #undef MD_STARTFILE_PREFIX
  
! #undef CPP_PREDEFINES
! #define CPP_PREDEFINES \
!  "-DPPC -D__ELF__ -Dpowerpc -Acpu=powerpc -Amachine=powerpc"
  
  #undef	CPP_OS_DEFAULT_SPEC
  #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
--- 27,43 ----
  #undef MD_EXEC_PREFIX
  #undef MD_STARTFILE_PREFIX
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()          \
!   do                                      \
!     {                                     \
!       builtin_define_std ("PPC");         \
!       builtin_define_std ("__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: gcc/config/rs6000/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux64.h,v
retrieving revision 1.19
diff -c -3 -p -r1.19 linux64.h
*** gcc/config/rs6000/linux64.h	12 Jun 2002 03:06:26 -0000	1.19
--- gcc/config/rs6000/linux64.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 106,116 ****
  #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  CPP_OS_DEFAULT_SPEC
  #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
--- 106,128 ----
  #undef MD_EXEC_PREFIX
  #undef MD_STARTFILE_PREFIX
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()            \
!   do                                        \
!     {                                       \
!       builtin_define_std ("_PPC_");         \
!       builtin_define_std ("__PPC__");       \
!       builtin_define_std ("_PPC64_");       \
!       builtin_define_std ("__PPC64__");     \
!       builtin_define_std ("__powerpc__");   \
!       builtin_define_std ("__powerpc64__"); \
!       builtin_define_std ("_PIC_");         \
!       builtin_define_std ("__PIC__");       \
!       builtin_define_std ("__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: gcc/config/rs6000/lynx.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/lynx.h,v
retrieving revision 1.10
diff -c -3 -p -r1.10 lynx.h
*** gcc/config/rs6000/lynx.h	18 May 2002 23:47:17 -0000	1.10
--- gcc/config/rs6000/lynx.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 53,60 ****
  #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 LINK_SPEC
  #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}"
--- 53,74 ----
  #undef DEFAULT_SIGNED_CHAR
  #define DEFAULT_SIGNED_CHAR 1
  
! #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_std ("_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: gcc/config/rs6000/mach.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/mach.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 mach.h
*** gcc/config/rs6000/mach.h	20 Nov 2001 19:43:28 -0000	1.6
--- gcc/config/rs6000/mach.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 26,33 ****
  #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"
  
  /* Define different binder options for MACH.  */
  #undef LINK_SPEC
--- 26,44 ----
  #define TARGET_VERSION fprintf (stderr, " (Mach-RS/6000)");
  
  /* We don't define AIX under MACH; instead we define `unix'.  */
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()         \
!   do                                     \
!     {                                    \
!       builtin_define_std ("rios");       \
!       builtin_define_std ("_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: gcc/config/rs6000/rtems.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rtems.h,v
retrieving revision 1.14
diff -c -3 -p -r1.14 rtems.h
*** gcc/config/rs6000/rtems.h	12 Apr 2002 13:35:00 -0000	1.14
--- gcc/config/rs6000/rtems.h	3 Jul 2002 15:38:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 21,26 ****
  
  /* Specify predefined symbols in preprocessor.  */
  
! #undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-DPPC -D__rtems__ \
!    -Asystem=rtems -Acpu=powerpc -Amachine=powerpc"
--- 21,34 ----
  
  /* Specify predefined symbols in preprocessor.  */
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()          \
!   do                                      \
!     {                                     \
!       builtin_define_std ("PPC");         \
!       builtin_define_std ("__rtems__");   \
!       builtin_assert ("system=rtems");    \
!       builtin_assert ("cpu=powerpc");     \
!       builtin_assert ("machine=powerpc"); \
!     }                                     \
!   while (0)
Index: gcc/config/rs6000/sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.97
diff -c -3 -p -r1.97 sysv4.h
*** gcc/config/rs6000/sysv4.h	11 Jun 2002 23:14:47 -0000	1.97
--- gcc/config/rs6000/sysv4.h	3 Jul 2002 15:38:10 -0000
*************** do {						\
*** 808,816 ****
  #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"
  #endif
  
  /* Pass various options to the assembler.  */
--- 808,826 ----
  #define	TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
  #endif
  
! #ifndef	TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()          \
!   do                                      \
!     {                                     \
!       builtin_define_std ("PPC");         \
!       builtin_define_std ("unix");        \
!       builtin_define_std ("__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: gcc/config/rs6000/vxppc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/vxppc.h,v
retrieving revision 1.9
diff -c -3 -p -r1.9 vxppc.h
*** gcc/config/rs6000/vxppc.h	11 Jun 2002 23:14:47 -0000	1.9
--- gcc/config/rs6000/vxppc.h	3 Jul 2002 15:38:10 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 39,48 ****
  #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"
  
  /* We use stabs-in-elf for debugging */
  #undef PREFERRED_DEBUGGING_TYPE
--- 39,56 ----
  #undef	LINK_OS_DEFAULT_SPEC
  #define LINK_OS_DEFAULT_SPEC "%(link_os_vxworks)"
  
! #undef TARGET_OS_CPP_BUILTINS
! #define TARGET_OS_CPP_BUILTINS()          \
!   do                                      \
!     {                                     \
!       builtin_define_std ("__vxworks");   \
!       builtin_define_std ("__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

Attachment: msg00154/pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]