This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patches to support SunChorus OS cross platforms




Sun Chorus OS has 3 cross platforms (Ultrasparc, i386, rs6000) running on 
solaris 7 host. These cross platforms are similiar to the corresponding 
elf targets, except they support dwarf2 debugging format by default 
with no multilibs. Here is the patch please let me know it is okay to 
apply.

Thanks
Chandra

001-02-02  Chandrakala Chavva <cchavva@redhat.com>

        * configure.in: for *-chorusos, don't config target-newlib and
        target-libgloss.
        * config.sub: Add chorusos.

Index: config.sub
===================================================================
RCS file: /cvs/gcc/egcs/config.sub,v
retrieving revision 1.51
diff -p -r1.51 config.sub
*** config.sub	2000/11/06 19:20:24	1.51
--- config.sub	2001/02/08 18:02:32
*************** case $os in
*** 147,153 ****
  		;;
  	-chorusos*)
  		os=-chorusos
! 		basic_machine=$1
  		;;
   	-chorusrdb)
   		os=-chorusrdb
--- 147,153 ----
  		;;
  	-chorusos*)
  		os=-chorusos
! 		#basic_machine=$1
  		;;
   	-chorusrdb)
   		os=-chorusrdb
*************** case $basic_machine in
*** 513,518 ****
--- 513,522 ----
  		basic_machine=i386-mach
  		os=-mach
  		;;
+ 	i[34567]86-chorusos)
+ 		basic_machine=i386-unknown
+ 		os=-chorusos
+ 		;;
  	i386-vsta | vsta)
  		basic_machine=i386-unknown
  		os=-vsta
*************** case $basic_machine in
*** 704,709 ****
--- 708,717 ----
  	pn)
  		basic_machine=pn-gould
  		;;
+ 	powerpc-chorusos)
+ 		basic_machine=powerpc-unknown
+ 		os=-chorusos
+ 		;;
  	power)	basic_machine=rs6000-ibm
  		;;
  	ppc)	basic_machine=powerpc-unknown
*************** case $basic_machine in
*** 740,745 ****
--- 748,757 ----
  		basic_machine=sh-hitachi
  		os=-hms
  		;;
+ 	sparc-chorusos)
+ 		basic_machine=sparc-unknown
+ 		os=-chorusos
+ 		;;
  	sparclite-wrs)
  		basic_machine=sparclite-wrs
  		os=-vxworks
*************** case $basic_machine in
*** 1278,1283 ****
--- 1290,1298 ----
  				;;
  			-beos*)
  				vendor=be
+ 				;;
+ 			-chorusos)
+ 				vendor=sun
  				;;
  			-hpux*)
  				vendor=hp
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/configure.in,v
retrieving revision 1.88
diff -p -r1.88 configure.in
*** configure.in	2001/01/28 06:58:58	1.88
--- configure.in	2001/02/08 18:18:20
*************** fi
*** 355,360 ****
--- 355,363 ----
  # per-target:
  
  case "${target}" in
+   *-*-chorusos)
+     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+     ;;
    v810*)
      target_makefile_frag="${target_makefile_frag} config/mt-v810"
      ;;

2001-02-08  Chandrakala Chavva  <cchavva@redhat.com>

        * config.gcc : New targets, i386-*-chorusos*, sparc-*-chorusos*,
        powerpc-*-chorusos* .
        * config/rs6000/chorus.h : New file.
        * config/i386/chorus.h : New file.
        * config/sparc/chorus.h : New file.
        * config/sparc/t-chorus-elf : New file.

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config.gcc,v
retrieving revision 1.26
diff -p -r1.26 config.gcc
*** config.gcc	2001/01/31 20:50:31	1.26
--- config.gcc	2001/02/08 18:02:52
*************** i370-*-linux*)
*** 978,983 ****
--- 978,994 ----
  		thread_file='posix'
  	fi
  	;;
+ i[34567]86-*-chorusos*)
+ 	xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
+ 	tm_file="i386/i386.h i386/att.h elfos.h i386/i386afe.h i386/i386elf.h i386/chorus.h"
+ 	tmake_file=i386/t-i386elf
+ 	xmake_file=x-svr4
+ 	case x${enable_threads} in
+ 	  xyes | xpthreads | xposix)
+ 		thread_file='posix'
+ 		;;
+ 	esac
+ 	;;
  i[34567]86-*-elf*)
  	xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
  	tm_file="i386/i386.h i386/att.h elfos.h i386/i386afe.h i386/i386elf.h"
*************** powerpc-*-sysv*)
*** 2750,2755 ****
--- 2761,2776 ----
  	tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
  	xmake_file=rs6000/x-sysv4
  	;;
+ powerpc-*-chorusos*)
+ 	tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/chorus.h"
+ 	tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
+ 	extra_headers=ppc-asm.h
+ 	case x${enable_threads} in
+ 	  xyes | xpthreads | xposix)
+ 		thread_file='posix'
+ 		;;
+ 	esac
+ 	;;
  powerpc-*-eabiaix*)
  	tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
  	tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
*************** sparc-*-openbsd*)
*** 2989,2994 ****
--- 3010,3026 ----
  	;;
  sparc-*-bsd*)
  	tm_file=sparc/bsd.h
+ 	;;
+ sparc-*-chorusos*)
+ 	tm_file="sparc/sol2.h sparc/elf.h sparc/chorus.h"
+ 	tmake_file=sparc/t-chorus-elf
+ 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+ 	float_format=i64
+ 	case x${enable_threads} in
+ 	  xyes | xpthreads | xposix)
+ 		thread_file='posix'
+ 		;;
+ 	esac
  	;;
Index: config/rs6000/chorus.h
===================================================================
RCS file: chorus.h
diff -N chorus.h
*** /dev/null	Tue May  5 13:32:27 1998
--- chorus.h	Thu Feb  8 11:11:20 2001
***************
*** 0 ****
--- 1,43 ----
+ /* Definitions of target machine for GNU compiler.
+    Sun Chorus OS big-endian
+    Copyright (c) 2000 Red Hat Support Inc.
+ 
+ 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ #undef DWARF2_DEBUGGING_INFO
+ #define DWARF2_DEBUGGING_INFO
+ 
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+ 
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fprintf (stderr, " (PowerPC Sun Chorus OS Embedded)");
+ 
+ /* Type used for ptrdiff_t, as a string used in a declaration.  */
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "int"
+ 
+ /* Type used for size_t, as a string used in a declaration.  */
+ #undef SIZE_TYPE
+ #define SIZE_TYPE "unsigned int"
+ 
+ /* Type used for wchar_t, as a string used in a declaration.  */
+ #undef WCHAR_TYPE
+ #define WCHAR_TYPE "int"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "-r"
Index: config/sparc/chorus.h
===================================================================
RCS file: chorus.h
diff -N chorus.h
*** /dev/null	Tue May  5 13:32:27 1998
--- chorus.h	Thu Feb  8 11:11:20 2001
***************
*** 0 ****
--- 1,42 ----
+ /* Definitions of target machine for GNU compiler.
+    Sun Chorus OS big-endian
+    Copyright (c) 2000 Red Hat Support Inc.
+ 
+ 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ #undef DWARF2_DEBUGGING_INFO
+ #define DWARF2_DEBUGGING_INFO
+ 
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+ 
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fprintf (stderr, " (Ultrasparc IIi Sun Chorus OS Embedded)");
+ 
+ #undef SIZE_TYPE
+ #define SIZE_TYPE "unsigned int"
+ 
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "int"
+ 
+ /* Type used for wchar_t, as a string used in a declaration.  */
+ #undef WCHAR_TYPE
+ #define WCHAR_TYPE "int"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "-r"
+ 
Index: config/sparc/t-chorus-elf
===================================================================
RCS file: t-chorus-elf
diff -N t-chorus-elf
*** /dev/null	Tue May  5 13:32:27 1998
--- t-chorus-elf	Thu Feb  8 11:11:20 2001
***************
*** 0 ****
--- 1,36 ----
+ # we need to supply our own assembly versions of libgcc1.c files,
+ # since the user may not have native 'cc' available
+ 
+ CROSS_LIBGCC1 = libgcc1-asm.a
+ LIB1ASMSRC = sparc/lb1spc.asm
+ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3
+ 
+ # crt0 is built elsewhere
+ LIBGCC1_TEST =
+ 
+ # We want fine grained libraries, so use the new code to build the
+ # floating point emulation libraries.
+ FPBIT = fp-bit.c
+ DPBIT = dp-bit.c
+ 
+ dp-bit.c: $(srcdir)/config/fp-bit.c
+ 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
+ 
+ fp-bit.c: $(srcdir)/config/fp-bit.c
+ 	echo '#define FLOAT' > fp-bit.c
+ 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+ 
+ # MULTILIB_OPTIONS should have msparclite too, but we'd have to make
+ # gas build...
+ MULTILIB_OPTIONS = 
+ MULTILIB_DIRNAMES = 
+ MULTILIB_MATCHES = 
+ 
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+ 
+ # Assemble startup files.
+ crti.o: $(srcdir)/config/sparc/sol2-ci.asm $(GCC_PASSES)
+ 	$(GCC_FOR_TARGET) -c -o crti.o -x assembler $(srcdir)/config/sparc/sol2-ci.asm
+ crtn.o: $(srcdir)/config/sparc/sol2-cn.asm $(GCC_PASSES)
+ 	$(GCC_FOR_TARGET) -c -o crtn.o -x assembler $(srcdir)/config/sparc/sol2-cn.asm
Index: config/i386/chorus.h
===================================================================
RCS file: chorus.h
diff -N chorus.h
*** /dev/null	Tue May  5 13:32:27 1998
--- chorus.h	Thu Feb  8 11:12:17 2001
***************
*** 0 ****
--- 1,44 ----
+ /* Definitions of target machine for GNU compiler.
+    Sun Chorus OS big-endian
+    Copyright (c) 2000 Red Hat Support Inc.
+ 
+ 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ #undef DWARF2_DEBUGGING_INFO
+ #define DWARF2_DEBUGGING_INFO
+ 
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+ 
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fprintf (stderr, " (IA-32 Sun Chorus OS Embedded)");
+ 
+ #undef SIZE_TYPE
+ #define SIZE_TYPE "unsigned int"
+ 
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "int"
+ 
+ /* Type used for wchar_t, as a string used in a declaration.  */
+ #undef WCHAR_TYPE
+ #define WCHAR_TYPE "int"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "-r"
+ 
+ #undef LIB_SPEC
+ #define LIB_SPEC ""

2001-02-02  Chandrakala Chavva  <cchavva@redhat.com>

        * configure.in (*-chorusos*): Recognize.
        * config/chorus.mt: New file.
 
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libio/Attic/configure.in,v
retrieving revision 1.31
diff -p -r1.31 configure.in
*** configure.in	2000/08/14 18:08:46	1.31
--- configure.in	2001/02/08 18:06:46
*************** case x$enable_threads in
*** 53,58 ****
--- 53,59 ----
  esac
  
  case "${target}" in
+   *-chorusos*)   frags="chorus.mt" ;;
    *-mpeix*)      frags="mpeix.mt" ;;
    *-hpux*)       frags=hpux.mt ;;
    alpha*-*-linux*libc1)
Index: config/chorus.mt
===================================================================
RCS file: chorus.mt
diff -N chorus.mt
*** /dev/null	Tue May  5 13:32:27 1998
--- chorus.mt	Thu Feb  8 11:12:44 2001
***************
*** 0 ****
--- 1 ----
+ G_CONFIG_ARGS = HAVE_PRINTF_FP=0 HAVE_LONG_DOUBLE_IO=0






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]