GNU CC 2.7.2.2/GNU Fortran 77 for NEWS-OS Release 4.x


$B9=C[4D6-(B:

NEWS-OS Release 4.2.1a+

  NWS-5000X
  NEWS C 2.11
  GNU make 3.75
  GNU sed 2.0.5
  GNU bison 1.25
  GNU flex 2.5.4a
  GNU grep 2.0


$B%$%s%9%H!<%kJ}K!(B:
  # make
  # make install


hiraga@meis.sony.co.jp



diff -arc gcc-2.7.2.2/config/mips/news4.h gcc-2722-newsos4/config/mips/news4.h
*** gcc-2.7.2.2/config/mips/news4.h	Fri Jun 16 04:34:18 1995
--- gcc-2722-newsos4/config/mips/news4.h	Tue Mar  4 15:14:43 1997
***************
*** 21,36 ****
  #define MIPS_NEWS
  
  #define CPP_PREDEFINES "\
! -Dr3000 -Dnews3700 -DLANGUAGE_C -DMIPSEB -DSYSTYPE_BSD \
  -Dsony_news -Dsony -Dunix -Dmips -Dhost_mips \
  -Asystem(unix) -Asystem(bsd) -Acpu(mips) -Amachine(mips)"
  
! #define SYSTEM_INCLUDE_DIR "/usr/include2.0"
  
  #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc"
  
  #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  
  #define MACHINE_TYPE "RISC NEWS-OS"
  
  #include "mips/mips.h"
--- 21,38 ----
  #define MIPS_NEWS
  
  #define CPP_PREDEFINES "\
! -Dr4000 -Dnews5000 -DLANGUAGE_C -DMIPSEB -DSYSTYPE_BSD \
  -Dsony_news -Dsony -Dunix -Dmips -Dhost_mips \
  -Asystem(unix) -Asystem(bsd) -Acpu(mips) -Amachine(mips)"
  
! #define SYSTEM_INCLUDE_DIR "/usr/sony/include"
  
  #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc"
  
  #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  
  #define MACHINE_TYPE "RISC NEWS-OS"
+ 
+ #define MD_STARTFILE_PREFIX "/usr/sony/lib/"
  
  #include "mips/mips.h"
diff -arc gcc-2.7.2.2/f/proj.h gcc-2722-newsos4/f/proj.h
*** gcc-2.7.2.2/f/proj.h	Sat Mar  1 13:26:03 1997
--- gcc-2722-newsos4/f/proj.h	Tue Mar  4 16:49:05 1997
***************
*** 59,65 ****
  #define FFEPROJ_BSEARCH 1	/* 0=>use slow code in proj.c. */
  #endif
  #ifndef FFEPROJ_STRTOUL
! #define FFEPROJ_STRTOUL 1	/* 0=>use untested code in proj.c. */
  #endif
  
  /* Include files everyone gets. */
--- 59,69 ----
  #define FFEPROJ_BSEARCH 1	/* 0=>use slow code in proj.c. */
  #endif
  #ifndef FFEPROJ_STRTOUL
! #if defined(__sony_news__) && defined(__MIPSEB__)
! #define FFEPROJ_STRTOUL 0	/* 0=>use untested code in proj.c. */
! #else
! #define FFEPROJ_STRTOUL 1
! #endif
  #endif
  
  /* Include files everyone gets. */
diff -arc gcc-2.7.2.2/f/runtime/libF77/main.c gcc-2722-newsos4/f/runtime/libF77/main.c
*** gcc-2.7.2.2/f/runtime/libF77/main.c	Thu Oct 31 19:35:31 1996
--- gcc-2722-newsos4/f/runtime/libF77/main.c	Tue Mar  4 15:14:44 1997
***************
*** 1,4 ****
--- 1,7 ----
  /* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
+ #if defined(__sony_news__) && defined(__MIPSEB__)
+ #define NO_ONEXIT 1
+ #endif
  
  #include <stdio.h>
  #include <signal.h>
diff -arc gcc-2.7.2.2/f/runtime/libF77/s_paus.c gcc-2722-newsos4/f/runtime/libF77/s_paus.c
*** gcc-2.7.2.2/f/runtime/libF77/s_paus.c	Fri Dec 20 04:15:58 1996
--- gcc-2722-newsos4/f/runtime/libF77/s_paus.c	Tue Mar  4 15:14:45 1997
***************
*** 1,6 ****
--- 1,9 ----
  #include <stdio.h>
  #include "f2c.h"
  #define PAUSESIG 15
+ #if defined(__sony_news__) && defined(__MIPSEB__)
+ #define NO_ONEXIT 1
+ #endif
  
  #ifdef KR_headers
  #define Void /* void */
diff -arc gcc-2.7.2.2/f/runtime/libF77/s_stop.c gcc-2722-newsos4/f/runtime/libF77/s_stop.c
*** gcc-2.7.2.2/f/runtime/libF77/s_stop.c	Thu Oct 31 19:36:37 1996
--- gcc-2722-newsos4/f/runtime/libF77/s_stop.c	Tue Mar  4 15:14:45 1997
***************
*** 1,5 ****
--- 1,8 ----
  #include <stdio.h>
  #include "f2c.h"
+ #if defined(__sony_news__) && defined(__MIPSEB__)
+ #define NO_ONEXIT 1
+ #endif
  
  #ifdef KR_headers
  extern void f_exit();
diff -arc gcc-2.7.2.2/f/runtime/libF77/sig_die.c gcc-2722-newsos4/f/runtime/libF77/sig_die.c
*** gcc-2.7.2.2/f/runtime/libF77/sig_die.c	Thu Oct 31 19:36:37 1996
--- gcc-2722-newsos4/f/runtime/libF77/sig_die.c	Tue Mar  4 15:14:45 1997
***************
*** 1,5 ****
--- 1,6 ----
  #include <stdio.h>
  #include <signal.h>
+ #define NO_ONEXIT 1
  
  #ifndef SIGIOT
  #ifdef SIGABRT
diff -arc gcc-2.7.2.2/f/runtime/libU77/ctime_.c gcc-2722-newsos4/f/runtime/libU77/ctime_.c
*** gcc-2.7.2.2/f/runtime/libU77/ctime_.c	Mon Feb 10 03:59:54 1997
--- gcc-2722-newsos4/f/runtime/libU77/ctime_.c	Tue Mar  4 17:28:50 1997
***************
*** 19,24 ****
--- 19,27 ----
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/fdate_.c gcc-2722-newsos4/f/runtime/libU77/fdate_.c
*** gcc-2.7.2.2/f/runtime/libU77/fdate_.c	Mon Feb  3 13:27:14 1997
--- gcc-2722-newsos4/f/runtime/libU77/fdate_.c	Tue Mar  4 17:32:35 1997
***************
*** 20,25 ****
--- 20,28 ----
  #include "config.h"
  #endif
  #include <stdio.h>
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/gmtime_.c gcc-2722-newsos4/f/runtime/libU77/gmtime_.c
*** gcc-2.7.2.2/f/runtime/libU77/gmtime_.c	Mon Feb  3 13:27:15 1997
--- gcc-2722-newsos4/f/runtime/libU77/gmtime_.c	Tue Mar  4 17:32:03 1997
***************
*** 19,24 ****
--- 19,27 ----
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  /* fixme: do we need to use TM_IN_SYS_TIME? */
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/idate_.c gcc-2722-newsos4/f/runtime/libU77/idate_.c
*** gcc-2.7.2.2/f/runtime/libU77/idate_.c	Mon Feb  3 13:27:15 1997
--- gcc-2722-newsos4/f/runtime/libU77/idate_.c	Tue Mar  4 17:28:01 1997
***************
*** 20,25 ****
--- 20,28 ----
  #include "config.h"
  #endif
  #include <stdio.h>
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/itime_.c gcc-2722-newsos4/f/runtime/libU77/itime_.c
*** gcc-2.7.2.2/f/runtime/libU77/itime_.c	Mon Feb  3 13:27:15 1997
--- gcc-2722-newsos4/f/runtime/libU77/itime_.c	Tue Mar  4 17:24:30 1997
***************
*** 20,25 ****
--- 20,28 ----
  #include "config.h"
  #endif
  #include <stdio.h>
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/ltime_.c gcc-2722-newsos4/f/runtime/libU77/ltime_.c
*** gcc-2.7.2.2/f/runtime/libU77/ltime_.c	Mon Feb  3 13:27:16 1997
--- gcc-2722-newsos4/f/runtime/libU77/ltime_.c	Tue Mar  4 17:29:46 1997
***************
*** 19,24 ****
--- 19,27 ----
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  /* fixme: do we need to use TM_IN_SYS_TIME? */
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/system_clock_.c gcc-2722-newsos4/f/runtime/libU77/system_clock_.c
*** gcc-2.7.2.2/f/runtime/libU77/system_clock_.c	Wed Feb  5 07:04:43 1997
--- gcc-2722-newsos4/f/runtime/libU77/system_clock_.c	Wed Mar  5 14:47:00 1997
***************
*** 19,24 ****
--- 19,28 ----
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
+ #if defined(__sony_news__)
+ #include <sys/types.h>
+ #include <machine/machparam.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/vxtidate_.c gcc-2722-newsos4/f/runtime/libU77/vxtidate_.c
*** gcc-2.7.2.2/f/runtime/libU77/vxtidate_.c	Mon Feb  3 13:27:17 1997
--- gcc-2722-newsos4/f/runtime/libU77/vxtidate_.c	Tue Mar  4 17:31:27 1997
***************
*** 20,25 ****
--- 20,28 ----
  #include "config.h"
  #endif
  #include <stdio.h>
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/f/runtime/libU77/vxttime_.c gcc-2722-newsos4/f/runtime/libU77/vxttime_.c
*** gcc-2.7.2.2/f/runtime/libU77/vxttime_.c	Mon Feb  3 14:18:13 1997
--- gcc-2722-newsos4/f/runtime/libU77/vxttime_.c	Tue Mar  4 17:30:42 1997
***************
*** 20,25 ****
--- 20,28 ----
  #include "config.h"
  #endif
  #include <stdio.h>
+ #if defined(__sony_news__) && !defined(_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
  #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
diff -arc gcc-2.7.2.2/fixincludes gcc-2722-newsos4/fixincludes
*** gcc-2.7.2.2/fixincludes	Sun Jun 30 01:26:34 1996
--- gcc-2722-newsos4/fixincludes	Tue Mar  4 15:14:47 1997
***************
*** 1641,1646 ****
--- 1641,1647 ----
  if [ -r ${LIB}/$file ]; then
    echo Fixing $file, non-const arg
    sed -e 's@atof(\([ 	]*char[ 	]*\*[^)]*\))@atof(const \1)@' \
+       -e 's@strtod(\([    ]*char[         ]*\*[^)]*\))@strtod(const \1)@' \
        -e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \
        -e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \
        -e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \
