+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.
#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 */
+
#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 */
{"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.
#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 */
#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 */
#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 */
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "rtems", 0 },
+
+/* end of pa/rtems.h */
#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 */
{ "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"
--- /dev/null
+/* 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 */
{"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)
#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 */
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
;;
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
;;