aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-06-01 23:27:50 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>2002-06-01 23:27:50 +0000
commit0d66ad572b03eb9d8921c649ba6f4b0cfdf2e8b6 (patch)
treec9ed4ef77631bd22e64d0d7bea6d059b73b53f73 /gcc
parent5c856b23687ca60610fb67b80f1e1e663c2db691 (diff)
downloadgcc-0d66ad572b03eb9d8921c649ba6f4b0cfdf2e8b6.zip
gcc-0d66ad572b03eb9d8921c649ba6f4b0cfdf2e8b6.tar.gz
gcc-0d66ad572b03eb9d8921c649ba6f4b0cfdf2e8b6.tar.bz2
c4x.h (TARGET_CPU_CPP_BUILTINS): New.
* c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): New. (CPP_SPEC, CPP_PREDEFINES): Kill. * c4x/rtems.h (CPP_PREDEFINES): Kill. (TARGET_OS_CPP_BUILTINS): New. From-SVN: r54155
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/c4x/c4x.h78
-rw-r--r--gcc/config/c4x/rtems.h8
3 files changed, 65 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2e50189..f601740 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2002-06-02 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): New.
+ (CPP_SPEC, CPP_PREDEFINES): Kill.
+ * c4x/rtems.h (CPP_PREDEFINES): Kill.
+ (TARGET_OS_CPP_BUILTINS): New.
+
Sat Jun 1 23:29:51 CEST 2002 Jan Hubicka <jh@suse.cz>
* Makefile.in (tracer.o): New.
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index e7423f8..9ccb2f9 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -28,6 +28,58 @@
#define C4x 1
+#define TARGET_CPU_CPP_BUILTINS() \
+ do \
+ { \
+ if (!TARGET_SMALL) \
+ builtin_define ("_BIGMODEL"); \
+ if (!TARGET_MEMPARM) \
+ builtin_define ("_REGPARM"); \
+ if (flag_inline_functions) \
+ builtin_define ("_INLINE"); \
+ if (TARGET_C3X) \
+ { \
+ builtin_define ("_TMS320C3x"); \
+ builtin_define ("_C3x"); \
+ if (TARGET_C30) \
+ { \
+ builtin_define ("_TMS320C30"); \
+ builtin_define ("_C30"); \
+ } \
+ else if (TARGET_C31) \
+ { \
+ builtin_define ("_TMS320C31"); \
+ builtin_define ("_C31"); \
+ } \
+ else if (TARGET_C32) \
+ { \
+ builtin_define ("_TMS320C32"); \
+ builtin_define ("_C32"); \
+ } \
+ else if (TARGET_C33) \
+ { \
+ builtin_define ("_TMS320C33"); \
+ builtin_define ("_C33"); \
+ } \
+ } \
+ else \
+ { \
+ builtin_define ("_TMS320C4x"); \
+ builtin_define ("_C4x"); \
+ if (TARGET_C40) \
+ { \
+ builtin_define ("_TMS320C40"); \
+ builtin_define ("_C40"); \
+ } \
+ else if (TARGET_C44) \
+ { \
+ builtin_define ("_TMS320C44"); \
+ builtin_define ("_C44"); \
+ } \
+ } \
+ } \
+ while (0)
+
/* Name of the c4x assembler. */
#define ASM_PROG "c4x-as"
@@ -70,30 +122,6 @@
%{mcpu=32:--architecture c3x} \
%{mcpu=33:--architecture c3x}"
-/* Define C preprocessor options. */
-
-#define CPP_SPEC "\
-%{!m30:%{!m31:%{!m32:%{!m33:%{!mcpu=30:%{!mcpu=31:%{!mcpu=32:%{!mcpu=33:\
-%{!mcpu=40:%{!mcpu=44:%{\
-!m40:%{!m44:-D_TMS320C4x -D_C4x -D_TMS320C40 -D_C40}}}}}}}}}}}} \
-%{mcpu=30:-D_TMS320C3x -D_C3x -D_TMS320C30 -D_C30 } \
-%{m30:-D_TMS320C3x -D_C3x -D_TMS320C30 -D_C30 } \
-%{mcpu=31:-D_TMS320C3x -D_C3x -D_TMS320C31 -D_C31 } \
-%{m31:-D_TMS320C3x -D_C3x -D_TMS320C31 -D_C31 } \
-%{mcpu=32:-D_TMS320C3x -D_C3x -D_TMS320C32 -D_C32 } \
-%{m32:-D_TMS320C3x -D_C3x -D_TMS320C32 -D_C32 } \
-%{mcpu=33:-D_TMS320C3x -D_C3x -D_TMS320C33 -D_C33 } \
-%{m33:-D_TMS320C3x -D_C3x -D_TMS320C33 -D_C33 } \
-%{mcpu=40:-D_TMS320C4x -D_C4x -D_TMS320C40 -D_C40 } \
-%{m40:-D_TMS320C4x -D_C4x -D_TMS320C40 -D_C40 } \
-%{mcpu=44:-D_TMS320C4x -D_C4x -D_TMS320C44 -D_C44 } \
-%{m44:-D_TMS320C4x -D_C4x -D_TMS320C44 -D_C44 } \
-%{mmemparm:-U_REGPARM }%{mregparm:-D_REGPARM } \
-%{!mmemparm:%{!mregparm:-D_REGPARM }} \
-%{msmall:-U_BIGMODEL } %{mbig:-D_BIGMODEL } \
-%{!msmall:%{!mbig:-D_BIGMODEL }} \
-%{finline-functions:-D_INLINE }"
-
/* Specify the end file to link with. */
#define ENDFILE_SPEC ""
@@ -1855,8 +1883,6 @@ do { \
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "\t.ident \"%s\"\n", NAME);
-#define CPP_PREDEFINES ""
-
/* Output of Uninitialized Variables. */
/* This says how to output an assembler line to define a local
diff --git a/gcc/config/c4x/rtems.h b/gcc/config/c4x/rtems.h
index 400d883..d51d37d 100644
--- a/gcc/config/c4x/rtems.h
+++ b/gcc/config/c4x/rtems.h
@@ -21,5 +21,9 @@ Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems -D__USE_INIT_FINI__"
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__rtems__"); \
+ builtin_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+ } while (0)