aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-03-12 11:46:56 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-03-12 11:46:56 +0000
commitf7248b51e34e499f847a479295aae0d1748ff630 (patch)
treeca48f54faa42b04436602aae8b1c045322e6d603 /gcc
parent8a7d6cb3d82be44da036f45e244d01cd4f9ab0e5 (diff)
downloadgcc-f7248b51e34e499f847a479295aae0d1748ff630.zip
gcc-f7248b51e34e499f847a479295aae0d1748ff630.tar.gz
gcc-f7248b51e34e499f847a479295aae0d1748ff630.tar.bz2
/home/neil/diffs/mcore.log
From-SVN: r64240
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/mcore/mcore-elf.h7
-rw-r--r--gcc/config/mcore/mcore-pe.h7
-rw-r--r--gcc/config/mcore/mcore.h40
4 files changed, 40 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7dc4ec5..ccdfe4d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2003-03-12 Neil Booth <neil@daikokuya.co.uk>
+
+ * config/mcore/mcore-elf.h (CPP_PREDEFINES): Replace with
+ TARGET_OS_CPP_BUILTINS.
+ * config/mcore/mcore-pe.h: Similarly.
+ * config/mcore/mcore.h: Replace CPP_PREDEFINES and part of
+ CPP_SPEC with TARGET_CPU_CPP_BUILTINS.
+
2003-03-12 Eric Botcazou <ebotcazou@libertysurf.fr>
PR c/9928
diff --git a/gcc/config/mcore/mcore-elf.h b/gcc/config/mcore/mcore-elf.h
index b4c7ae6..b837859 100644
--- a/gcc/config/mcore/mcore-elf.h
+++ b/gcc/config/mcore/mcore-elf.h
@@ -25,7 +25,12 @@ Boston, MA 02111-1307, USA. */
/* Run-time Target Specification. */
#define TARGET_VERSION fputs (" (Motorola MCORE/elf)", stderr)
-#define SUBTARGET_CPP_PREDEFINES " -D__ELF__"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__ELF__"); \
+ } \
+ while (0)
/* Use DWARF2 debugging info. */
#define DWARF2_DEBUGGING_INFO 1
diff --git a/gcc/config/mcore/mcore-pe.h b/gcc/config/mcore/mcore-pe.h
index a6ea4d4..96381c9 100644
--- a/gcc/config/mcore/mcore-pe.h
+++ b/gcc/config/mcore/mcore-pe.h
@@ -22,7 +22,12 @@ Boston, MA 02111-1307, USA. */
/* Run-time Target Specification. */
#define TARGET_VERSION fputs (" (MCORE/pe)", stderr)
-#define SUBTARGET_CPP_PREDEFINES " -D__pe__"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__pe__"); \
+ } \
+ while (0)
/* The MCore ABI says that bitfields are unsigned by default. */
/* The EPOC C++ environment does not support exceptions. */
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index 6d2078c..d570abf 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -46,28 +46,28 @@ Boston, MA 02111-1307, USA. */
predefined attributes later on. This can be solved by using one attribute,
say __declspec__, and passing args to it. The problem with that approach
is that args are not accumulated: each new appearance would clobber any
- existing args. XXX- FIXME the definition below relies upon string
- concatenation, which is non-portable. */
-#define CPP_PREDEFINES \
- "-D__mcore__ -D__MCORE__=1 -D__declspec(x)=__attribute__((x))" SUBTARGET_CPP_PREDEFINES
-
-/* If -m4align is ever re-enabled then uncomment this line as well:
- #define CPP_SPEC "%{!m4align:-D__MCORE_ALIGN_8__} %{m4align:-D__MCORE__ALIGN_4__}" */
-
-#undef CPP_SPEC
-#define CPP_SPEC " \
-%{mbig-endian: \
- %{mlittle-endian:%echoose either big or little endian, not both} \
- -D__MCOREBE__} \
-%{m210: \
- %{m340:%echoose either m340 or m210 not both} \
- %{mlittle-endian:%ethe m210 does not have little endian support} \
- -D__M210__} \
-%{!mbig-endian: -D__MCORELE__} \
-%{!m210: -D__M340__} \
-"
+ existing args. */
+#define TARGET_CPU_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__mcore__"); \
+ builtin_define ("__MCORE__"); \
+ builtin_define ("__declspec(x)=__attribute__((x))"); \
+ if (TARGET_LITTLE_END) \
+ builtin_define ("__MCORELE__"); \
+ else \
+ builtin_define ("__MCOREBE__"); \
+ if (TARGET_M340) \
+ builtin_define ("__M340__"); \
+ else \
+ builtin_define ("__M210__"); \
+ } \
+ while (0)
+
/* If -m4align is ever re-enabled then add this line to the definition of CPP_SPEC
%{!m4align:-D__MCORE_ALIGN_8__} %{m4align:-D__MCORE__ALIGN_4__} */
+#undef CPP_SPEC
+#define CPP_SPEC "%{m210:%{mlittle-endian:%ethe m210 does not have little endian support}}";
/* We don't have a -lg library, so don't put it in the list. */
#undef LIB_SPEC