Seen: 
Path: phoebe.st.ryukoku.ac.jp!rinsgw!wnoc-kyo-news!aist-nara!odins-suita!kuee-news!tamaru-news!rim.or.jp!uucp1.rim.or.jp!ryozan!alta
From: alta@ryozan.rim.or.jp (Sumida)
Newsgroups: fj.sys.news
Subject: gcc-2.7.2.1-newsos6.diff
Date: 22 Jan 1997 21:58:44 GMT
Organization: RYOZAN/INET
Lines: 386
Message-ID: <5c62ik$54g@ryozan.ryozan.rim.or.jp>
NNTP-Posting-Host: create8.ryozan.rim.or.jp
X-Newsreader: mnews [version 1.19PL2] 1996-01/26(Fri)

NEWS-OS 6.X $BMQ$N(B gcc $B$r:n$k$?$a$N(B patch $B$G$9!#(B

configure $B$OL@<(E*$K0J2<$N$h$&$K(B
% ./configure --host=mips-sony-newsos6 
$B$H$7$F$/$@$5$$!#(B

$BEvA3!"L5J]>Z!"L5@UG$$J$N$G;HMQ$K4X$7$F$O3F<+$N(B
$BH=CG$G$*4j$$$7$^$9!#0l1~!"EvJ}$G$O$3$l$GFsG/6a$/(B
$B;H$$B3$1$F$*$j$^$9!#(B

$B$J$*(B -g $B%*%W%7%g%s$K$OBP1~$7$F$^$;$s$N$GCm0U$7$F$/$@$5$$!#(B

$B$G!"$3$l$OKM$,$^$k$4$H:n@.$7$?$o$1$G$J$/!"5-21$K$h$k$H(B
$B$I$3$+$+$i(B gcc-2.6.* $B$h$&$N(B patch $B$rF~<j$7$F!"$=$l$r(B
$B;29M$K$7$F:n@.$7$F$^$9!#(B

------ gcc-2.7.2.1-newsos6.diff -------
diff -c2rP gcc-2.7.2.1/config/mips/news6.h gcc-2.7.2.1-newsos6/config/mips/news6.h
*** gcc-2.7.2.1/config/mips/news6.h	Thu Jan  1 09:00:00 1970
--- gcc-2.7.2.1-newsos6/config/mips/news6.h	Sat Nov 23 01:47:49 1996
***************
*** 0 ****
--- 1,205 ----
+ /* Definitions of target machine for GNU compiler.  NEWS-OS Release 6 version.
+    Copyright (C) 1992 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ #define MIPS_SVR4
+ 
+ #define TARGET_DEFAULT  MASK_ABICALLS
+ #define ABICALLS_ASM_OP ".option pic2"
+ 
+ /* Specify wchar_t types.  */
+ #define WCHAR_TYPE      "long int"
+ #define WCHAR_TYPE_SIZE LONG_TYPE_SIZE
+ #define MAX_WCHAR_TYPE_SIZE     MAX_LONG_TYPE_SIZE
+ 
+ #define CPP_PREDEFINES \
+ "-D__unix -D__sony -D__sony_news -D__svr4 -D__mips \
+ -D__r4000 -D__news5000 -D_MIPSEB -D_SYSTYPE_SYSV \
+ -D__svr4__ -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 \
+ -Asystem(unix) -Acpu(mips) -Amachine(sony_news)"
+ 
+ #define CPP_SPEC "\
+ %{.cc:  -D_LANGUAGE_C_PLUS_PLUS} \
+ %{.cxx: -D_LANGUAGE_C_PLUS_PLUS} \
+ %{.C:   -D_LANGUAGE_C_PLUS_PLUS} \
+ %{.m:   -D_LANGUAGE_OBJECTIVE_C -D_LANGUAGE_C} \
+ %{.S:   -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
+ %{.s:   -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
+ %{!.S:%{!.s: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}} \
+ %{!ansi:-Dunix -Dsony -Dsony_news -Dmips -DMIPSEB -DSYSTYPE_SYSV} \
+ %{!mfp64: -D_MIPS_FPSET=16}%{mfp64: -D_MIPS_FPSET=32} \
+ %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
+ %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
+ %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
+ %{!mips1: %{!mips2: %{!mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS1}}} \
+ %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
+ %{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64} \
+ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
+ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
+ %{mips3:-U__mips -D__mips=3}"
+ 
+ 
+ /* Extra switches sometimes passed to the assembler.  */
+ 
+ #ifndef ASM_SPEC
+ #if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GAS) != 0
+ /* GAS */
+ #define ASM_SPEC "\
+ %{mmips-as: \
+ 	%{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \
+ 	%{pipe: %e-pipe is not supported.} \
+ 	%{K} \
+ 	%{!non_shared: -KPIC}} \
+ %{!mmips-as: \
+ 	%{mcpu=*}} \
+ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \
+ %{noasmopt:-O0} \
+ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
+ %{g} %{g0} %{g1} %{g2} %{g3} \
+ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
+ %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
+ %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
+ %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \
+ %{membedded-pic}"
+ 
+ #else
+ /* not GAS */
+ #define ASM_SPEC "\
+ %{!mgas: \
+ 	%{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \
+ 	%{pipe: %e-pipe is not supported.} \
+ 	%{K} \
+ 	%{!non_shared: -KPIC}} \
+ %{mgas: \
+ 	%{mcpu=*}} \
+ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \
+ %{noasmopt:-O0} \
+ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
+ %{g} %{g0} %{g1} %{g2} %{g3} \
+ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
+ %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
+ %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
+ %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \
+ %{membedded-pic}"
+ 
+ #endif
+ #endif  /* ASM_SPEC */
+ 
+ 
+ #define LINK_SPEC "\
+ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
+ %{bestGnum} %{shared} %{non_shared} \
+ %{call_shared} %{no_archive} %{exact_version} \
+ %{!shared: %{!non_shared: %{!call_shared: -call_shared}}}"
+ 
+ #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
+ 
+ #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\
+ 	%{ansi:/usr/ccs/lib/values-Xc.o%s} \
+                           %{!ansi: \
+                            %{traditional:/usr/ccs/lib/values-Xt.o%s} \
+                            %{!traditional:/usr/ccs/lib/values-Xa.o%s}}"
+ 
+ #define MACHINE_TYPE "NEWS-OS Release 6.0"
+ 
+ /* Override defaults for finding the MIPS tools.  */
+ #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
+ #define MD_EXEC_PREFIX "/usr/lib/cmplrs/cc/"
+ 
+ /* -G is incompatible with -KPIC which is the default, so only allow objects
+    in the small data section if the user explicitly asks for it.  */
+ #define MIPS_DEFAULT_GVALUE 0
+ 
+ #define STACK_ARGS_ADJUST(SIZE)                                         \
+ {                                                                       \
+   SIZE.constant += 4;                                                   \
+   if (SIZE.constant < 32)                                               \
+     SIZE.constant = 32;                                                 \
+ }
+ 
+ /* char is signed char in the NEWS-C compiler */
+ /* but, changing char is unsigned char  by Alta.H.Sumida */
+ #define DEFAULT_SIGNED_CHAR 0
+ 
+ /* Mips System V.4 doesn't have a getpagesize() function needed by the
+    trampoline code, so use the POSIX sysconf function to get it.
+    This is only done when compiling the trampoline code.  */
+ 
+ #ifdef  L_trampoline
+ #include <unistd.h>
+ 
+ /* In at least 5.0 and 5.01, there is no _SC_PAGE_SIZE macro, only a
+    _SC_PAGESIZE macro.  */
+ #ifdef _SC_PAGESIZE
+ #define _SC_PAGE_SIZE _SC_PAGESIZE
+ #endif
+ 
+ #define getpagesize()	sysconf(_SC_PAGE_SIZE)
+ #endif /*  L_trampoline */
+ 
+ /* Use atexit for static constructors/destructors, instead of defining
+    our own exit function.  */
+ #define HAVE_ATEXIT
+ 
+ /* Generate calls to memcpy, etc., not bcopy, etc.  */
+ #define TARGET_MEM_FUNCTIONS
+ 
+ #include "mips/mips.h"
+ 
+ #undef OBJECT_FORMAT_COFF
+ #define OBJECT_FORMAT_ELF
+ #undef ASM_FINAL_SPEC
+ 
+ /* In Irix 5, we must output a `.global name .text' directive for every used
+    but undefined function.  If we don't, the linker may perform an optimization
+    (skipping over the insns that set $gp) when it is unsafe.  This is used
+    indirectly by ASM_OUTPUT_EXTERNAL.  */
+ #define ASM_OUTPUT_UNDEF_FUNCTION(FILE, NAME)   \
+ do {                                            \
+   fputs ("\t.globl ", FILE);                    \
+   assemble_name (FILE, NAME);                   \
+   fputs (" .text\n", FILE);                     \
+ } while (0)
+ 
+ /* Also do this for libcalls.  */
+ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)  \
+   mips_output_external_libcall (FILE, XSTR (FUN, 0))
+ 
+ /* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables.
+    This is used indirectly by ASM_OUTPUT_EXTERNAL.  */
+ #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)   \
+ do {                                                    \
+   tree name_tree = get_identifier (NAME);               \
+   TREE_ASM_WRITTEN (name_tree) = 1;                     \
+ } while (0)
+ 
+ /* Some assemblers have a bug that causes backslash escaped chars in .ascii
+    to be misassembled, so we just completely avoid it.  */
+ #undef ASM_OUTPUT_ASCII
+ #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)			\
+ do {							\
+   unsigned char *s;					\
+   int i;						\
+   for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++)	\
+     {							\
+       if ((i % 8) == 0)					\
+ 	fputs ("\n\t.byte\t", (FILE));			\
+       fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \
+     }							\
+   fputs ("\n", (FILE));					\
+ } while (0)
diff -c2rP gcc-2.7.2.1/config/mips/news6gas.h gcc-2.7.2.1-newsos6/config/mips/news6gas.h
*** gcc-2.7.2.1/config/mips/news6gas.h	Thu Jan  1 09:00:00 1970
--- gcc-2.7.2.1-newsos6/config/mips/news6gas.h	Tue Nov 26 15:05:32 1996
***************
*** 0 ****
--- 1,31 ----
+ /* Definitions of target machine for GNU compiler.  Irix version 5 with gas. */
+ 
+ #include "mips/news6.h"
+ 
+ /* Enable debugging.  */
+ #define DBX_DEBUGGING_INFO
+ #define SDB_DEBUGGING_INFO
+ #define MIPS_DEBUGGING_INFO
+ 
+ /* Irix 5 does not have some strange restrictions that Irix 3 had.  */
+ #undef SET_FILE_NUMBER
+ #define SET_FILE_NUMBER() ++num_source_filenames
+ #undef LABEL_AFTER_LOC
+ #define LABEL_AFTER_LOC(STREAM)
+ 
+ /* We need to use .esize and .etype instead of .size and .type to
+    avoid conflicting with ELF directives.  These are only recognized
+    by gas, anyhow, not the native assembler.  */
+ #undef PUT_SDB_SIZE
+ #define PUT_SDB_SIZE(a)                                       \
+ do {                                                  \
+   extern FILE *asm_out_text_file;                     \
+   fprintf (asm_out_text_file, "\t.esize\t%d;", (a));  \
+ } while (0)
+ 
+ #undef PUT_SDB_TYPE
+ #define PUT_SDB_TYPE(a)                                       \
+ do {                                                  \
+   extern FILE *asm_out_text_file;                     \
+   fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a));        \
+ } while (0)
diff -c2rP gcc-2.7.2.1/config/mips/news6gdb.h gcc-2.7.2.1-newsos6/config/mips/news6gdb.h
*** gcc-2.7.2.1/config/mips/news6gdb.h	Thu Jan  1 09:00:00 1970
--- gcc-2.7.2.1-newsos6/config/mips/news6gdb.h	Tue Nov 26 15:05:56 1996
***************
*** 0 ****
--- 1,7 ----
+ /* Definitions of target machine for GNU compiler.  Irix version 5 with gas
+    and gdb.  */
+ 
+ /* Use stabs instead of ECOFF debug format.  */
+ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+ 
+ #include "mips/news6gas.h"
diff -c2rP gcc-2.7.2.1/config/mips/x-news6 gcc-2.7.2.1-newsos6/config/mips/x-news6
*** gcc-2.7.2.1/config/mips/x-news6	Thu Jan  1 09:00:00 1970
--- gcc-2.7.2.1-newsos6/config/mips/x-news6	Sat Nov 23 01:47:50 1996
***************
*** 0 ****
--- 1,31 ----
+ # Define CC and OLDCC as the same, so that the tests:
+ #	if [ x"$(OLDCC)" = x"$(CC)" ] ...
+ #
+ # will succeed (if OLDCC != CC, it is assumed that GCC is
+ # being used in secondary stage builds).  We need to pass
+ # the -Wf,-XNg1500 option so the compiler can compile the
+ # G++ file cp-parse.c.  Otherwise it complains about
+ # too many case statements.  -Olimit is so the user
+ # can use -O2.  Down with fixed size tables!
+ # The -cckr is to turn off strict ANSI checking.
+ 
+ CC		= $(OLDCC)
+ OPT		= -O1
+ OLDCC		= cc -Olimit 3000 $(OPT)
+ 
+ # The bison output files are machine-indep,
+ # so different flags for a particular machine are not useful.
+ #BISONFLAGS	= -l
+ 
+ # -lmld is so we can link collect2 running native.
+ # -lmalloc is supposed to be faster than the normal malloc
+ CLIB		= -lmld -lmalloc
+ 
+ # Show we need to use the C version of ALLOCA
+ ALLOCA		= alloca.o
+ 
+ # Find all of the declarations from the header files
+ FIXPROTO_DEFINES= -D__EXTENSIONS__
+ 
+ # B option not supported on hpux.
+ TAROUTOPTS = xpf
diff -c2rP gcc-2.7.2.1/config/mips/xm-news6.h gcc-2.7.2.1-newsos6/config/mips/xm-news6.h
*** gcc-2.7.2.1/config/mips/xm-news6.h	Thu Jan  1 09:00:00 1970
--- gcc-2.7.2.1-newsos6/config/mips/xm-news6.h	Sat Nov 23 01:47:50 1996
***************
*** 0 ****
--- 1,3 ----
+ #include "mips/xm-sysv.h"
+ 
+ #define NO_SYS_SIGLIST
diff -c2rP gcc-2.7.2.1/config.guess gcc-2.7.2.1-newsos6/config.guess
*** gcc-2.7.2.1/config.guess	Mon Nov 27 04:56:22 1995
--- gcc-2.7.2.1-newsos6/config.guess	Sat Nov 23 01:47:50 1996
***************
*** 138,141 ****
--- 138,144 ----
  	fi
   	exit 0 ;;
+     news*:NEWS-OS:6*:*)
+ 	echo mips-sony-newsos6
+ 	exit 0 ;;
      M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
  	echo m88k-dolphin-sysv3
diff -c2rP gcc-2.7.2.1/configure gcc-2.7.2.1-newsos6/configure
*** gcc-2.7.2.1/configure	Mon Nov 27 04:39:15 1995
--- gcc-2.7.2.1-newsos6/configure	Tue Nov 26 15:08:26 1996
***************
*** 1773,1777 ****
  		prefix=$native_prefix
  		;;
! 	mips-sony-bsd* | mips-sony-newsos*)	# Sony NEWS 3600 or risc/news.
  		if [ x$stabs = xyes ]; then
  			tm_file=mips/news4-gdb.h
--- 1773,1777 ----
  		prefix=$native_prefix
  		;;
! 	mips-sony-bsd* | mips-sony-newsos4*)	# Sony NEWS 3600 or risc/news.
  		if [ x$stabs = xyes ]; then
  			tm_file=mips/news4-gdb.h
***************
*** 1810,1813 ****
--- 1810,1834 ----
  			use_collect2=yes
  		fi
+ 		;;
+ 	mips-sony-newsos6*)		# NEWS-OS 6.0
+ 		if [ x$gas = xyes ]
+ 		then
+ 			if [ x$stabs = xyes ]
+ 			then
+ 				tm_file=mips/news6gdb.h
+ 			else
+ 				tm_file=mips/news6gas.h
+ 			fi
+ 		else
+ 			tm_file=mips/news6.h
+ 		fi
+ 		xm_file=mips/xm-news6.h
+ 		broken_install=yes
+ 		fixincludes=Makefile.in
+ 		xmake_file=mips/x-news6
+ 		# mips-tfile doesn't work yet
+ 		tmake_file=mips/t-mips-gas
+ 		# See comment in mips/iris5.h file.
+ 		use_collect2=yes
  		;;
  	mips-tandem-sysv4*)		# Tandem S2 running NonStop UX
------------ $B$3$3$^$G(B ----------


--
-- $B$`$+$7$NL>A0$G$G$F$$$^$;$s(B -- $B$9$_$@$O$D$7(B --
