summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/i386/go32-rtems.h7
-rw-r--r--gcc/config/i386/rtems.h6
-rw-r--r--gcc/config/i960/i960.h1
-rw-r--r--gcc/config/i960/rtems.h6
-rw-r--r--gcc/config/m68k/rtems.h6
-rw-r--r--gcc/config/mips/rtems64.h6
-rw-r--r--gcc/config/pa/rtems.h2
-rw-r--r--gcc/config/rs6000/rtems.h6
-rw-r--r--gcc/config/rs6000/sysv4.h4
-rw-r--r--gcc/config/sh/rtems.h35
-rw-r--r--gcc/config/sh/sh.h4
-rw-r--r--gcc/config/sparc/rtems.h6
-rwxr-xr-xgcc/configure5
-rw-r--r--gcc/configure.in5
15 files changed, 106 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a3373773329..783e5ec7b13 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+Mon Sep 1 08:04:07 1997 Joel Sherrill (joel@OARcorp.com)
+
+ * i386/go32-rtems.h, i386/rtems.h, i960/rtems.h,
+ m68k/rtems.h, mips/rtems64.h, pa/rtems.h, rs6000/rtems.h,
+ sparc/rtems.h (subtarget_switches): Added -mrtems as a switch.
+ * i960/i960.h: Added SUBTARGET_SWITCHES macro.
+ * rs6000/sysv4.h (extra_subtarget_switches): Added new
+ macro EXTRA_SUBTARGET_SWITCHES.
+ * configure.in (sh*-*-rtems*): New target.
+ * sh/rtems.h: New file.
+ * sh/sh.h: Added SUBTARGET_SWITCHES macro.
+ * configure: Rebuilt.
+
Sat Aug 30 22:54:26 1997 Jim Wilson <wilson@cygnus.com>
* unroll.c (calculate_giv_inc): Handle increment with code PLUS.
diff --git a/gcc/config/i386/go32-rtems.h b/gcc/config/i386/go32-rtems.h
index 282465b249b..d2be80b6011 100644
--- a/gcc/config/i386/go32-rtems.h
+++ b/gcc/config/i386/go32-rtems.h
@@ -30,3 +30,10 @@ Boston, MA 02111-1307, USA. */
#endif
#define CPP_PREDEFINES "-Dunix -Di386 -DGO32 -DMSDOS -Drtems -D__rtems__ \
-Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386) -Asystem(rtems)"
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of i386/go32-rtems.h */
+
diff --git a/gcc/config/i386/rtems.h b/gcc/config/i386/rtems.h
index 99c817a14d7..ea30a677460 100644
--- a/gcc/config/i386/rtems.h
+++ b/gcc/config/i386/rtems.h
@@ -28,4 +28,8 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Di386 -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(i386) -Amachine(i386)"
-/* end of i386-rtems.h */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of i386/rtems.h */
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index 34dc397d030..6ef1e12561c 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -269,6 +269,7 @@ extern int target_flags;
{"no-old-align", -(TARGET_FLAG_OLD_ALIGN|TARGET_FLAG_STRICT_ALIGN)}, \
{"link-relax", 0}, \
{"no-link-relax", 0}, \
+ SUBTARGET_SWITCHES \
{ "", TARGET_DEFAULT}}
/* Override conflicting target switch options.
diff --git a/gcc/config/i960/rtems.h b/gcc/config/i960/rtems.h
index 9263027f22c..af5a26f913a 100644
--- a/gcc/config/i960/rtems.h
+++ b/gcc/config/i960/rtems.h
@@ -28,4 +28,8 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(i960) -Amachine(i960)"
-/* end of i960-rtems.h */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of i960/rtems.h */
diff --git a/gcc/config/m68k/rtems.h b/gcc/config/m68k/rtems.h
index 8bb921db09d..817f05f3883 100644
--- a/gcc/config/m68k/rtems.h
+++ b/gcc/config/m68k/rtems.h
@@ -27,4 +27,8 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dmc68000 -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(mc68000) -Acpu(m68k) -Amachine(m68k)"
-/* end of m68k-rtems.h */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of m68k/rtems.h */
diff --git a/gcc/config/mips/rtems64.h b/gcc/config/mips/rtems64.h
index d4d8ac0ab3f..a9547c860bf 100644
--- a/gcc/config/mips/rtems64.h
+++ b/gcc/config/mips/rtems64.h
@@ -28,4 +28,8 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000 \
-Drtems -D__rtems__ -Asystem(rtems)"
-/* end of rtems64.h */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of mips/rtems64.h */
diff --git a/gcc/config/pa/rtems.h b/gcc/config/pa/rtems.h
index 0eba88628c0..784524d6a90 100644
--- a/gcc/config/pa/rtems.h
+++ b/gcc/config/pa/rtems.h
@@ -28,3 +28,5 @@ Boston, MA 02111-1307, USA. */
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "rtems", 0 },
+
+/* end of pa/rtems.h */
diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h
index b63b44c5747..0bcec52da35 100644
--- a/gcc/config/rs6000/rtems.h
+++ b/gcc/config/rs6000/rtems.h
@@ -28,6 +28,10 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-DPPC -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(powerpc) -Amachine(powerpc)"
-/* rtems is in the SUBTARGET_SWITCHES in rs6000/sysv4.h */
+/* extend the SUBTARGET_SWITCHES in rs6000/sysv4.h */
+
+#undef EXTRA_SUBTARGET_SWITCHES
+#define EXTRA_SUBTARGET_SWITCHES \
+ { "rtems", 0 },
/* end of powerpc-rtems.h */
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 294debf3f98..44dd686e0c5 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -95,8 +95,12 @@ extern enum rs6000_sdata_type rs6000_sdata;
{ "emb", 0 }, \
{ "solaris-cclib", 0 }, \
{ "shlib", 0 }, \
+ EXTRA_SUBTARGET_SWITCHES \
{ "newlib", 0 },
+/* This is meant to be redefined in the host dependent files */
+#define EXTRA_SUBTARGET_SWITCHES
+
/* Default ABI to use */
#define RS6000_ABI_NAME "sysv"
diff --git a/gcc/config/sh/rtems.h b/gcc/config/sh/rtems.h
new file mode 100644
index 00000000000..5cbdf9bb51a
--- /dev/null
+++ b/gcc/config/sh/rtems.h
@@ -0,0 +1,35 @@
+/* Definitions for rtems targetting a SH using elf.
+
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (joel@OARcorp.com).
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "sh/elf.h"
+
+/* Specify predefined symbols in preprocessor. */
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Drtems -D__rtems__ \
+ -Asystem(rtems) -Acpu(sh) -Amachine(sh)"
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of sparc/rtems.h */
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index ce5e26a3300..5210fdc76b4 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -144,9 +144,13 @@ extern int target_flags;
{"padstruct", PADSTRUCT_BIT}, \
{"relax", RELAX_BIT}, \
{"space", SPACE_BIT}, \
+ SUBTARGET_SWITCHES \
{"", TARGET_DEFAULT} \
}
+/* This are meant to be redefined in the host dependent files */
+#define SUBTARGET_SWITCHES
+
#define TARGET_DEFAULT (0)
#define PRESERVE_DEATH_INFO_REGNO_P(regno) (TARGET_RELAX || optimize)
diff --git a/gcc/config/sparc/rtems.h b/gcc/config/sparc/rtems.h
index 5e5ea14b1ee..5b18619fa2f 100644
--- a/gcc/config/sparc/rtems.h
+++ b/gcc/config/sparc/rtems.h
@@ -28,4 +28,8 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(sparc) -Amachine(sparc)"
-/* end of sparc-rtems.h */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "rtems", 0 },
+
+/* end of sparc/rtems.h */
diff --git a/gcc/configure b/gcc/configure
index fcf7502db02..44445181232 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -3667,6 +3667,11 @@ for machine in $build $host $target; do
tm_file=sh/elf.h
float_format=sh
;;
+ sh-*-rtems*)
+ tmake_file="sh/t-sh t-rtems"
+ tm_file=sh/rtems.h
+ float_format=sh
+ ;;
sh-*-*)
float_format=sh
;;
diff --git a/gcc/configure.in b/gcc/configure.in
index c99c7be48f5..7027f31458a 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -2286,6 +2286,11 @@ for machine in $build $host $target; do
tm_file=sh/elf.h
float_format=sh
;;
+ sh-*-rtems*)
+ tmake_file="sh/t-sh t-rtems"
+ tm_file=sh/rtems.h
+ float_format=sh
+ ;;
sh-*-*)
float_format=sh
;;