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]

[PATCH] fix rs6000 builtin defines for eabi, eabisim, rtems


This patch fixes mainline C builds for powerpc-eabisim.

Before the change for PowePC bi-arch support the macro CPP_SYSV_SPEC in
config/rs6000/sysv4.h defined _RELOCATABLE, __pic__, and __PIC__ at the
appropriate times.  Those were moved to TARGET_OS_SYSV_CPP_BUILTINS,
which was not included in all of the places where it's needed.  This
patch adds that to TARGET_OS_CPP_BUILTINS for eabi, eabisim, and rtems.

vxworks support doesn't currently set _RELOCATABLE and sets __pic__ and
__PIC__ differently, so it might need to be fixed as well.

Tested by building powerpc-eabisim, C only (more problems to
investigate!).

OK for mainline?

2003-06-09  Janis Johnson  <janis187@us.ibm.com>

	* config/rs6000/eabi.h (TARGET_OS_CPP_BUILTINS): Define builtins
	common to rs6000 sysv targets.
	* config/rs6000/eabisim.h (TARGET_OS_CPP_BUILTINS): Ditto.
	* config/rs6000/rtems.h (TARGET_OS_CPP_BUILTINS): Ditto.

Index: config/rs6000/eabi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/eabi.h,v
retrieving revision 1.10
diff -u -p -r1.10 eabi.h
--- config/rs6000/eabi.h	13 Apr 2003 17:51:06 -0000	1.10
+++ config/rs6000/eabi.h	10 Jun 2003 00:50:16 -0000
@@ -40,6 +40,7 @@
       builtin_assert ("system=embedded"); \
       builtin_assert ("cpu=powerpc");     \
       builtin_assert ("machine=powerpc"); \
+      TARGET_OS_SYSV_CPP_BUILTINS();      \
     }                                     \
   while (0)
 
Index: config/rs6000/eabisim.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/eabisim.h,v
retrieving revision 1.6
diff -u -p -r1.6 eabisim.h
--- config/rs6000/eabisim.h	13 Apr 2003 17:51:06 -0000	1.6
+++ config/rs6000/eabisim.h	10 Jun 2003 00:50:17 -0000
@@ -34,6 +34,7 @@
       builtin_assert ("system=simulator"); \
       builtin_assert ("cpu=powerpc");      \
       builtin_assert ("machine=powerpc");  \
+      TARGET_OS_SYSV_CPP_BUILTINS();       \
     }                                      \
   while (0)
 
Index: config/rs6000/rtems.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rtems.h,v
retrieving revision 1.17
diff -u -p -r1.17 rtems.h
--- config/rs6000/rtems.h	13 Apr 2003 17:51:08 -0000	1.17
+++ config/rs6000/rtems.h	10 Jun 2003 00:50:17 -0000
@@ -30,6 +30,7 @@
       builtin_assert ("system=rtems");    \
       builtin_assert ("cpu=powerpc");     \
       builtin_assert ("machine=powerpc"); \
+      TARGET_OS_SYSV_CPP_BUILTINS();      \
     }                                     \
   while (0)
 


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