[Patch] New sparc targets. 2.95?

Jonathan Larmour jlarmour@cygnus.co.uk
Thu Jun 24 14:50:00 GMT 1999


None of the sparc targets sparclite-elf, sparc86x-aout and sparc86x-elf
appear to be available in egcs, even though all the sparc.c/sparc.md support
is present.

This is simply an oversight from when stuff was being contributed by Cygnus,
which the attached patch fixes. I have not given a patch for "configure"
itself - it seems almost as pointless as ChangeLog patches, so whoever
applies the patch should run autoconf before committing.

Since this patch is effectively orthogonal to the operation of the rest of
egcs, I suppose there's no chance it could slip into 2.95? Unlikely I know,
but I thought I should ask...

Jifl

1999-06-24  Jonathan Larmour  <jlarmour@cygnus.co.uk>

	* config/sparc/liteelf.h: New file to support sparclite-elf target
	* config/sparc/t-sp86x: New file to support sparc86x targets
	* config/sparc/sp86x-aout.h: New file to support sparc86x-aout target
	* config/sparc/sp86x-elf.h: New file to support sparc86x-elf target
	* configure.in: Support above target triplets
	* configure: Regenerated

-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
 my brains kept falling out."    || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault
Index: gcc/configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.257
diff -u -5 -p -r1.257 configure.in
--- gcc/configure.in	1999/06/14 03:45:29	1.257
+++ gcc/configure.in	1999/06/24 21:13:30
@@ -3185,10 +3185,24 @@ changequote([,])dnl
 		;;
 	sparclite-*-aout*)
 		tm_file="sparc/lite.h aoutos.h libgloss.h"
 		tmake_file=sparc/t-sparclite
 		;;
+	sparclite-*-elf*)
+		tm_file="sparc/liteelf.h libgloss.h"
+		tmake_file=sparc/t-sparclite
+                extra_parts="crtbegin.o crtend.o"
+		;;
+	sparc86x-*-aout*)
+		tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
+		tmake_file=sparc/t-sp86x
+		;;
+	sparc86x-*-elf*)	
+		tm_file="sparc/sp86x-elf.h libgloss.h"
+		tmake_file=sparc/t-sp86x
+                extra_parts="crtbegin.o crtend.o"
+		;;
 	sparc64-*-aout*)
 		tmake_file=sparc/t-sp64
 		tm_file=sparc/sp64-aout.h
 		;;
 	sparc64-*-elf*)
--- /dev/null	Tue May  5 21:32:27 1998
+++ gcc/config/sparc/liteelf.h	Wed Jun 23 22:19:57 1999
@@ -0,0 +1,49 @@
+/* Definitions of target machine for GNU compiler, for SPARClite w/o FPU.
+   Copyright (C) 1998 Free Software Foundation, Inc.
+   Contributed by Stan Cox (scox@cygnus.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 "sparc/elf.h"
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu(sparc) -Amachine(sparc)"
+
+/* Default to dwarf2 in ELF.  */
+
+#define DWARF_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparclite)");
+
+/* Enable app-regs and epilogue options.  Do not enable the fpu.  */
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE)
+
+/* US Software GOFAST library support.  */
+#include "gofast.h"
+#undef INIT_SUBTARGET_OPTABS
+#define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS      
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crti.o%s crtbegin.o%s"
--- /dev/null	Tue May  5 21:32:27 1998
+++ gcc/config/sparc/sp86x-aout.h	Wed Jun 23 22:20:22 1999
@@ -0,0 +1,60 @@
+/* Definitions of target machine for GNU compiler, for sparclite 86x w/o FPU.
+   Copyright (C) 1998 Free Software Foundation, 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, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "sparc/sparc.h"
+
+#define HAVE_ATEXIT
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dsparc -Dsparclite86x -Acpu(sparc) -Amachine(sparc)"
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparclite 86x)");
+
+/* Enable app-regs and epilogue options.  Do not enable the fpu.  */
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE)
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+{"big-endian", -MASK_LITTLE_ENDIAN},		\
+{"little-endian", MASK_LITTLE_ENDIAN},		
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{v:-v} %{mlittle-endian-data:--little-endian-data} %(asm_cpu)"
+
+/* US Software GOFAST library support.  */
+#include "gofast.h"
+#undef INIT_SUBTARGET_OPTABS
+#define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{v:-V}"
+
+#undef BYTES_BIG_ENDIAN
+#define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN_DATA)
+#undef WORDS_BIG_ENDIAN
+#define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN_DATA)
+
+#define TARGET_LITTLE_ENDIAN_DATA (target_flags & MASK_LITTLE_ENDIAN)
+#undef  SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+    { "little-endian-data",              MASK_LITTLE_ENDIAN },     
--- /dev/null	Tue May  5 21:32:27 1998
+++ gcc/config/sparc/t-sp86x	Wed Jun 23 22:20:35 1999
@@ -0,0 +1,21 @@
+CROSS_LIBGCC1 = libgcc1-asm.a
+LIB1ASMSRC = sparc/lb1spc.asm
+LIB1ASMFUNCS = _divsi3 _modsi3
+
+LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define US_SOFTWARE_GOFAST' > dp-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
+	echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+MULTILIB_OPTIONS = mlittle-endian-data
+MULTILIB_DIRNAMES = little
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
--- /dev/null	Tue May  5 21:32:27 1998
+++ gcc/config/sparc/sp86x-elf.h	Wed Jun 23 22:20:46 1999
@@ -0,0 +1,73 @@
+/* Definitions of target machine for GNU compiler, for sparclite 86x w/o FPU.
+   Copyright (C) 1998 Free Software Foundation, Inc.
+   Contributed by Stan Cox (scox@cygnus.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 "sparc/elf.h"
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dsparc -Dsparclite86x -Acpu(sparc) -Amachine(sparc)"
+
+/* Default to dwarf2 in ELF.  */
+
+#define DWARF_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparclite 86x)");
+
+/* Enable app-regs and epilogue options.  Do not enable the fpu.  */
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE)
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+{"big-endian", -MASK_LITTLE_ENDIAN},		\
+{"little-endian", MASK_LITTLE_ENDIAN},		
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{v:-V} %{mlittle-endian-data:--little-endian-data} %(asm_cpu)"
+
+/* US Software GOFAST library support.  */
+#include "gofast.h"
+#undef INIT_SUBTARGET_OPTABS
+#define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS      
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crti.o%s crtbegin.o%s"
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{v:-V} %{mlittle-endian-data:-EL}"
+
+#undef BYTES_BIG_ENDIAN
+#define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN_DATA)
+#undef WORDS_BIG_ENDIAN
+#define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN_DATA)
+
+/* Use __main method of constructor invocation */
+#undef INIT_SECTION_ASM_OP
+
+#define TARGET_LITTLE_ENDIAN_DATA (target_flags & MASK_LITTLE_ENDIAN)
+#undef  SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+    { "little-endian-data",              MASK_LITTLE_ENDIAN },     


More information about the Gcc-patches mailing list