From 578f5dbf5d86014a106bdd5cc2f226a052f34a03 Mon Sep 17 00:00:00 2001
From: wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 12 Jun 2003 05:18:12 +0000
Subject: [PATCH] Kaos support from Uwe Stieber * config.gcc (arm*-*-kaos*,
 i[34567]86-*-kaos*, powerpc-*-kaos*, powerpcle-*-kaos*, strongarm-*-kaos*):
 New targets. (sh-*-elf*): Add sh*-*-kaos* support. * config/kaos.h,
 config/arm/kaos-strongarm.h, config/arm/kaos-arm.h, config/i386/kaos-i386.h,
 config/rs6000/kaos-ppc.h, config/sh/kaos-sh.h: New files.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67819 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                   |  9 +++++++++
 gcc/config.gcc                  | 26 +++++++++++++++++++++++++-
 gcc/config/arm/kaos-arm.h       | 24 ++++++++++++++++++++++++
 gcc/config/arm/kaos-strongarm.h | 24 ++++++++++++++++++++++++
 gcc/config/i386/kaos-i386.h     | 24 ++++++++++++++++++++++++
 gcc/config/kaos.h               | 27 +++++++++++++++++++++++++++
 gcc/config/rs6000/kaos-ppc.h    | 24 ++++++++++++++++++++++++
 gcc/config/sh/kaos-sh.h         | 24 ++++++++++++++++++++++++
 8 files changed, 181 insertions(+), 1 deletion(-)
 create mode 100644 gcc/config/arm/kaos-arm.h
 create mode 100644 gcc/config/arm/kaos-strongarm.h
 create mode 100644 gcc/config/i386/kaos-i386.h
 create mode 100644 gcc/config/kaos.h
 create mode 100644 gcc/config/rs6000/kaos-ppc.h
 create mode 100644 gcc/config/sh/kaos-sh.h

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e7d48447b19b..68b527b716c1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2003-06-11  Uwe Stieber  <uwe@kaos-group.de>
+
+	* config.gcc (arm*-*-kaos*, i[34567]86-*-kaos*, powerpc-*-kaos*,
+	powerpcle-*-kaos*, strongarm-*-kaos*): New targets.
+	(sh-*-elf*): Add sh*-*-kaos* support.
+	* config/kaos.h, config/arm/kaos-strongarm.h, config/arm/kaos-arm.h,
+	config/i386/kaos-i386.h, config/rs6000/kaos-ppc.h,
+	config/sh/kaos-sh.h: New files.
+
 2003-06-12  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* gcse.c (fis_get_condition): Make it a global function.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 7e8d5541704a..f5c5a1e53dda 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -705,6 +705,10 @@ arm-*-pe*)
 	tmake_file=arm/t-pe
 	extra_objs="pe.o"
 	;;
+arm*-*-kaos*)
+	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-arm.h"
+	tmake_file=arm/t-arm-elf
+	;;
 avr-*-*)
 	;;
 c4x-*-rtems* | tic4x-*-rtems*)
@@ -1203,6 +1207,10 @@ i[34567]86-*-interix*)
 		tm_file="${tm_file} dbxcoff.h"
 	fi
 	;;
+i[34567]86-*-kaos*)
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
+	tmake_file="i386/t-i386elf t-svr4"
+	;;
 i960-*-coff*)
 	tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
 	tmake_file=i960/t-960bare
@@ -1709,6 +1717,14 @@ powerpcle-*-eabi*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
 	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	;;
+powerpc-*-kaos*)
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h kaos.h rs6000/kaos-ppc.h"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+	;;
+powerpcle-*-kaos*)
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h kaos.h rs6000/kaos-ppc.h"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+	;;
 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
 	tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
 	tmake_file="rs6000/t-fprules rs6000/t-newas"
@@ -1753,7 +1769,7 @@ s390x-*-linux*)
 	out_file=s390/s390.c
 	tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff s390/t-linux64"
 	;;
-sh-*-elf* | sh[2346l]*-*-elf*)
+sh-*-elf* | sh[2346l]*-*-elf* | sh*-*-kaos*)
 	tmake_file="sh/t-sh sh/t-elf"
 	case $machine in
 	shl* | sh64l*)
@@ -1777,6 +1793,7 @@ sh-*-elf* | sh[2346l]*-*-elf*)
 	esac
 	case $machine in
 	sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
+	sh*-*-kaos*) tm_file="${tm_file} kaos.h sh/kaos-sh.h" ;;
 	esac
 	;;
 sh-*-rtemself*)
@@ -2029,6 +2046,13 @@ strongarm-*-pe)
 	extra_modes=arm/arm-modes.def
 	extra_objs=pe.o
 	;;
+strongarm-*-kaos*)
+	tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-strongarm.h"
+	tmake_file=arm/t-strongarm-elf
+	out_file=arm/arm.c
+	md_file=arm/arm.md
+	extra_modes=arm/arm-modes.def
+	;;
 v850e-*-*)
 	target_cpu_default="TARGET_CPU_v850e"
 	tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
diff --git a/gcc/config/arm/kaos-arm.h b/gcc/config/arm/kaos-arm.h
new file mode 100644
index 000000000000..0d3bf2d10303
--- /dev/null
+++ b/gcc/config/arm/kaos-arm.h
@@ -0,0 +1,24 @@
+/* Definitions of target machine for GNU compiler.
+   kaOS on arm architecture version.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (ARM/kaOS[ELF])", stderr);
+
diff --git a/gcc/config/arm/kaos-strongarm.h b/gcc/config/arm/kaos-strongarm.h
new file mode 100644
index 000000000000..8eb9473bf2b0
--- /dev/null
+++ b/gcc/config/arm/kaos-strongarm.h
@@ -0,0 +1,24 @@
+/* Definitions of target machine for GNU compiler.
+   kaOS on strongarm architecture version.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (StrongARM/kaOS[ELF])", stderr);
+
diff --git a/gcc/config/i386/kaos-i386.h b/gcc/config/i386/kaos-i386.h
new file mode 100644
index 000000000000..a16c861a7936
--- /dev/null
+++ b/gcc/config/i386/kaos-i386.h
@@ -0,0 +1,24 @@
+/* Definitions of target machine for GNU compiler.
+   kaOS on ia32 architecture version.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (i386/kaOS[ELF])", stderr);
+
diff --git a/gcc/config/kaos.h b/gcc/config/kaos.h
new file mode 100644
index 000000000000..1d0a7b1b0bb6
--- /dev/null
+++ b/gcc/config/kaos.h
@@ -0,0 +1,27 @@
+/* Definitions of target machine for GNU compiler.
+   common kaOS definitions for all architectures.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__kaOS__"
+
+/* do not link any library implicitly for kaOS target.  */
+#undef LIB_SPEC
+#define LIB_SPEC ""
diff --git a/gcc/config/rs6000/kaos-ppc.h b/gcc/config/rs6000/kaos-ppc.h
new file mode 100644
index 000000000000..d6b92e73e6a8
--- /dev/null
+++ b/gcc/config/rs6000/kaos-ppc.h
@@ -0,0 +1,24 @@
+/* Definitions of target machine for GNU compiler.
+   kaOS on PowerPC architecture version.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (PowerPC/kaOS[ELF])", stderr);
+
diff --git a/gcc/config/sh/kaos-sh.h b/gcc/config/sh/kaos-sh.h
new file mode 100644
index 000000000000..99e291be9991
--- /dev/null
+++ b/gcc/config/sh/kaos-sh.h
@@ -0,0 +1,24 @@
+/* Definitions of target machine for GNU compiler.
+   kaOS on sh architecture version.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (sh/kaOS[ELF])", stderr);
+
-- 
GitLab