[comp.sys.hp] How to make gcc & g++ on HP-UX 7.0

jand@kuling.UUCP (Jan Dj{rv) (07/04/90)

Here are the patches for building gcc on HP-UX 7.0.
Please read Readme before doing anything. Also note that these patches
doesn't preserve the source, i.e. the patched source can ONLY be compiled
on HP-UX 7.0 (successfully that is).

#!/bin/sh
# This is a shell archive (shar 3.30)
# made 07/04/1990 06:57 UTC by jhd@irfu.se
# Source directory /users/nobackup/data/jhd
#
# existing files WILL be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   2577 -rw-r--r-- Readme
#   7361 -rw-r--r-- binutils.diff
#    898 -rw-r--r-- exit-patch
#   5096 -rw-r--r-- gas.diff
#   9188 -rw-r--r-- gcc.diff
#   3462 -rw-r--r-- gdb.diff
#
if touch 2>&1 | fgrep 'mmdd' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= Readme ==============
echo "x - extracting Readme (Text)"
sed 's/^X//' << 'SHAR_EOF' > Readme &&
X(This is a sligthly modified version of Tom Lane's Readme)
X
XThese notes apply to
X	GCC 1.37.1
X	GAS 1.36
X	GDB 3.5
X	G++ 1.37.1
X	LIBG++ 1.37.0
X	BINUTILS
XMake sure you have these versions.
X
XDon't apply these diffs blindly. They will modify your Makefiles and the
Xpaths may not be agreeable to you.
XApply the supplied diffs to the binutils and gas stuff, checking paths.
XYou'll need to copy alloca.c from GCC into the binutils and gas directories.
XRemove the directory binutils/hp-include/sys and everything in it. It is
Xonly there for older versions of HP-UX than 7.0, which had there *.h files
Xin nonstandard (that is non-BSD) places.
XBuild the binutils you need (with HP's cc).  Install into a convenient
Xdirectory, and run the mkhplib script to make GNU-format copies of all the
Xstandard libraries.  (Note that the script will convert everything in the
Xstandard directories; you can then delete anything you don't expect to link
XGCC programs with.  Also, the script chokes if there are no libraries to
Xconvert in each of the directories it checks; I had to delete /usr/local/lib
Xin my copy for that reason.)
XNote that you have to modify libc.a to circumvent a limitation in
Xgnu ld (see exit-patch). Do this after the run of mkhplib.
X
XNow apply the diffs to gcc (check paths again).  Build per the installation
Xinstructions.  EXCEPTION: the first-pass compiler (gcc compiled with HP cc) is
XVERY inefficient with -O specified.  I recommend you make the second stage
Xwithout -O, then use that to build a production third stage with -O.  This
Xwill take less time than trying to make the production version directly!
X
XFinally, apply the diffs to gdb (checking paths), and build per instructions.
X
XIf you are going to build g++, do everything that it sais about setting up
Xdirectories and links, thereafter apply the diffs. Check paths again and then
Xmake.
X
XFor libg++, apply the patches, check paths and build.
XNote that if you are using GNU as & ld you need to make sure that the ranlib
Xan the ar in the Makefiles are the GNU ones. They are called gnu-ranlib
X(in the top Makefile) and gnu-ar (in the tests/Makefile and the src/Makefile),
Xyou might want to change this.
XDo not use the malloc that comes with libg++, it sometimes produces core dumpes.
XThe best solution is to copy malloc.o from g++ to the src directory. This
Xwill cause it to wind up in libg++.a.
XCompiling libg++ generates heaps of warnings, just ignore these.
XThis is also true for the tests.  All tests will not succeed, tFix and tRandom
Xwill differ from the expected result. These bugs have not been found as yet.
SHAR_EOF
$TOUCH -am 0704085690 Readme &&
chmod 0644 Readme ||
echo "restore of Readme failed"
set `wc -c Readme`;Wc_c=$1
if test "$Wc_c" != "2577"; then
	echo original size 2577, current size $Wc_c
fi
# ============= binutils.diff ==============
echo "x - extracting binutils.diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > binutils.diff &&
X*** binutils/hp-bin/Makefile.orig	Wed Jan  4 02:40:32 1989
X--- binutils/hp-bin/Makefile	Mon Jul  2 18:21:12 1990
X***************
X*** 7,15 ****
X  	rm -f *.o $(EXECUTABLES)
X  
X  hpxt : hpxt.o ioutil.o
X! 	$(CC) -o hpxt hpxt.o ioutil.o
X  
X  chatr : chatr.o ioutil.o
X! 	$(CC) -o chatr chatr.o ioutil.o
X  
X  hpxt.o chatr.o : ioutil.h
X--- 7,15 ----
X  	rm -f *.o $(EXECUTABLES)
X  
X  hpxt : hpxt.o ioutil.o
X! 	$(CC) $(CFLAGS) -o hpxt hpxt.o ioutil.o
X  
X  chatr : chatr.o ioutil.o
X! 	$(CC) $(CFLAGS) -o chatr chatr.o ioutil.o
X  
X  hpxt.o chatr.o : ioutil.h
X*** binutils/hp-bin/hpxt.c.orig	Fri Mar  3 16:47:59 1989
X--- binutils/hp-bin/hpxt.c	Mon Jul  2 18:21:13 1990
X***************
X*** 990,995 ****
X--- 990,996 ----
X    long output_start;
X    long output_end;
X    long input_end;
X+   char * slashptr;
X  
X    /* Strategy: leave a hole for the header, then process the file.
X       Afterwards, back up and write the header in place. */
X***************
X*** 1003,1009 ****
X  
X    output_end = (iou_lseek (output_file, 0, 1));
X    iou_lseek (output_file, header_position, 0);
X!   (* (index ((input_header -> ar_name), '/'))) = ' ';
X    {
X      char string_buffer [((sizeof (input_header -> ar_size)) + 1)];
X  
X--- 1004,1012 ----
X  
X    output_end = (iou_lseek (output_file, 0, 1));
X    iou_lseek (output_file, header_position, 0);
X!   slashptr = index ((input_header -> ar_name), '/');
X!   if (slashptr)
X!     *slashptr = ' ';
X    {
X      char string_buffer [((sizeof (input_header -> ar_size)) + 1)];
X  
X*** binutils/hp-bin/mkhplib.orig	Wed Jan  4 01:03:00 1989
X--- binutils/hp-bin/mkhplib	Mon Jul  2 18:21:13 1990
X***************
X*** 10,16 ****
X  # with the same name, the one we convert second will be the one we
X  # end up with.
X  
X! foreach dir (/usr/local/lib /usr/lib /lib)
X    cd $dir
X    foreach i (lib*.a)
X      echo "$dir/$i"
X--- 10,17 ----
X  # with the same name, the one we convert second will be the one we
X  # end up with.
X  
X! # foreach dir (/usr/local/lib /usr/lib /lib)
X! foreach dir (/usr/lib /lib)
X    cd $dir
X    foreach i (lib*.a)
X      echo "$dir/$i"
X*** binutils/Makefile.orig	Thu Oct 26 17:28:28 1989
X--- binutils/Makefile	Mon Jul  2 18:21:12 1990
X***************
X*** 2,7 ****
X--- 2,9 ----
X  # select a set of CFLAGS and PROGS, below, depending on the system type
X  # Copyright (C) 1989, Free Software Foundation, Inc.
X  #
X+ # Modified for use under HPUX,  Tom Lane 3/20/90
X+ #
X  # This file is part of GNU CC.
X  # 
X  # GNU CC is free software; you can redistribute it and/or modify
X***************
X*** 19,32 ****
X  # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
X  
X  
X  GNUCC = gcc -O
X  
X  # for BSD systems
X! CFLAGS = -g
X  # Don't add robotussin; it won't compile on BSD or GNU systems.
X  # objdump also won't compile on most systems (trouble with N_DATADDR).
X! PROGS = $(archpfx)gprof $(archpfx)ld $(archpfx)size \
X!         $(archpfx)nm $(archpfx)strip $(archpfx)ar $(archpfx)ranlib
X  
X  # for USG systems using COFF_ENCAPSULATE
X  # also, you will want to make the target libc.a (but it takes a long time)
X--- 21,36 ----
X  # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
X  
X  
X+ bindir = /usr/local/bin/gnu
X+ 
X  GNUCC = gcc -O
X  
X  # for BSD systems
X! #CFLAGS = -g
X  # Don't add robotussin; it won't compile on BSD or GNU systems.
X  # objdump also won't compile on most systems (trouble with N_DATADDR).
X! #PROGS = $(archpfx)gprof $(archpfx)ld $(archpfx)size \
X! #        $(archpfx)nm $(archpfx)strip $(archpfx)ar $(archpfx)ranlib
X  
X  # for USG systems using COFF_ENCAPSULATE
X  # also, you will want to make the target libc.a (but it takes a long time)
X***************
X*** 45,53 ****
X  # Don't add robotussin; use hpxt instead.
X  # Note that you should leave a copy of `ar' in this directory
X  # after you install it, since `ranlib' will try to run it from here.
X! #CFLAGS = -g -Ihp-include -DUSG -DNON_NATIVE
X! #PROGS = ld size nm strip ar ranlib
X! #LIBS = alloca.o
X  
X  # Use the GNU getopt unless you have problems with it.
X  GNU_GETOPT = $(archpfx)getopt.o
X--- 49,57 ----
X  # Don't add robotussin; use hpxt instead.
X  # Note that you should leave a copy of `ar' in this directory
X  # after you install it, since `ranlib' will try to run it from here.
X! CFLAGS = -O -Ihp-include -DUSG -DNON_NATIVE
X! PROGS = ld size nm strip ar ranlib
X! LIBS = alloca.o
X  
X  # Use the GNU getopt unless you have problems with it.
X  GNU_GETOPT = $(archpfx)getopt.o
X***************
X*** 55,60 ****
X--- 59,69 ----
X  
X  all: $(PROGS)
X  
X+ # For HPUX
X+ alloca.o:	alloca.c
X+ 	$(CC) $(CFLAGS) -Dhp9000s300  -E alloca.c >alloca.s
X+ 	as alloca.s -o alloca.o
X+ 
X  ld: $(archpfx)ld.o
X  # LIBS is used here since ld needs to use alloca.
X  # Alternatively, compile it with GNU C--then the compiler handles alloca.
X***************
X*** 70,76 ****
X  	$(CC) -o $(archpfx)strip $(archpfx)strip.o $(LIBS) $(GNU_GETOPT_LONG)
X  
X  $(archpfx)ar: $(archpfx)ar.o
X! 	$(CC) -o $(archpfx)ar $(archpfx)ar.o
X  
X  $(archpfx)gprof: $(archpfx)gprof.o $(GNU_GETOPT_LONG)
X  	$(GNUCC) -o $(archpfx)gprof $(archpfx)gprof.o $(GNU_GETOPT_LONG)
X--- 79,85 ----
X  	$(CC) -o $(archpfx)strip $(archpfx)strip.o $(LIBS) $(GNU_GETOPT_LONG)
X  
X  $(archpfx)ar: $(archpfx)ar.o
X! 	$(CC) -o $(archpfx)ar $(archpfx)ar.o $(LIBS)
X  
X  $(archpfx)gprof: $(archpfx)gprof.o $(GNU_GETOPT_LONG)
X  	$(GNUCC) -o $(archpfx)gprof $(archpfx)gprof.o $(GNU_GETOPT_LONG)
X***************
X*** 78,84 ****
X  	$(GNUCC) -c $(CFLAGS) gprof.c $(OUTPUT_OPTION)
X  
X  $(archpfx)ranlib: $(archpfx)ranlib.o
X! 	$(CC) -o $(archpfx)ranlib $(archpfx)ranlib.o $(GNU_GETOPT_LONG)
X  $(archpfx)ranlib.o: ranlib.c
X  	$(CC) -c $(CFLAGS) -DAR_PROG=\"$(bindir)/ar\" ranlib.c $(OUTPUT_OPTION)
X  
X--- 87,93 ----
X  	$(GNUCC) -c $(CFLAGS) gprof.c $(OUTPUT_OPTION)
X  
X  $(archpfx)ranlib: $(archpfx)ranlib.o
X! 	$(CC) -o $(archpfx)ranlib $(archpfx)ranlib.o $(GNU_GETOPT_LONG) $(LIBS)
X  $(archpfx)ranlib.o: ranlib.c
X  	$(CC) -c $(CFLAGS) -DAR_PROG=\"$(bindir)/ar\" ranlib.c $(OUTPUT_OPTION)
X  
X***************
X*** 113,120 ****
X  
X  .PHONY: install
X  install: $(PROGS)
X! 	for file in $(PROGS); do \
X! 	cp $$file $(bindir)/$${file}.new \
X! 	mv $(bindir)/$${file}.new $(bindir)/$file \
X! 	done
X! 
X--- 122,125 ----
X  
X  .PHONY: install
X  install: $(PROGS)
X! 	cp $(PROGS)  $(bindir)
X*** binutils/ld.c.orig	Tue Oct 17 17:50:24 1989
X--- binutils/ld.c	Mon Jul  2 18:21:15 1990
X***************
X*** 4376,4384 ****
X  symtab_init ()
X  {
X  #ifndef nounderscore
X!   edata_symbol = getsym ("_edata");
X!   etext_symbol = getsym ("_etext");
X!   end_symbol = getsym ("_end");
X  #else
X    edata_symbol = getsym ("edata");
X    etext_symbol = getsym ("etext");
X--- 4376,4384 ----
X  symtab_init ()
X  {
X  #ifndef nounderscore
X!   edata_symbol = getsym ("__edata");
X!   etext_symbol = getsym ("__etext");
X!   end_symbol = getsym ("__end");
X  #else
X    edata_symbol = getsym ("edata");
X    etext_symbol = getsym ("etext");
X*** binutils/ranlib.c.orig	Fri Sep  1 10:35:14 1989
X--- binutils/ranlib.c	Mon Jul  2 18:21:15 1990
X***************
X*** 123,129 ****
X  		perror ("wait");
X  	      if ((status & 0x7f) != 0)
X  		{
X! 		  psignal (prog, status & 0x7f);
X  		  exit (1);
X  		}
X  	      else if (((status & 0xff00) >> 8) != 0)
X--- 123,129 ----
X  		perror ("wait");
X  	      if ((status & 0x7f) != 0)
X  		{
X! 		  fprintf(stderr, "%s: signal %d\n", prog, status & 0x7f);
X  		  exit (1);
X  		}
X  	      else if (((status & 0xff00) >> 8) != 0)
SHAR_EOF
$TOUCH -am 0702182190 binutils.diff &&
chmod 0644 binutils.diff ||
echo "restore of binutils.diff failed"
set `wc -c binutils.diff`;Wc_c=$1
if test "$Wc_c" != "7361"; then
	echo original size 7361, current size $Wc_c
fi
# ============= exit-patch ==============
echo "x - extracting exit-patch (Text)"
sed 's/^X//' << 'SHAR_EOF' > exit-patch &&
X#! /bin/sh
X#
X# This shellscript modifyes libc.a for gcc, so that libg++, emacs and others
X# can be built.
X#
X# hpxt is made in binutils/hp-bin
XHPXT=hpxt
X# HPLD should be the name of HP:s ld, not GNU:s
XHPLD=ld
X# HPAR should be the name of HP:s ar, not GNU:s
XHPAR=ar
X# GNURANLIB is the name of GNU:s ranlib, not HP:s
XGNURANLIB=gnu-ranlib
X
Xecho "Copying libc.a..."
Xcd /tmp
Xcp /lib/libc.a .
Xchmod u+w libc.a
Xecho "Extracting exit.o and _exit.o..."
X$HPAR x libc.a exit.o/ _exit.o/
Xecho "Reorder and hide symbols..."
X$HPLD -r -o exit2.o -h ____exit -h __exit exit.o _exit.o
X$HPLD -r -o _exit2.o -h _exit -h _atexit -h __atexit exit.o _exit.o
Xmv _exit2.o _exit.o
Xmv exit2.o exit.o
Xecho "Update libc.a..."
X$HPAR r libc.a exit.o _exit.o
Xecho "Create GNU libc.a..."
X$HPXT libc.a /usr/local/lib/gnu/libc.a
X$GNURANLIB /usr/local/lib/gnu/libc.a
Xecho "Cleaning up..."
Xrm -r libc.a exit.o _exit.o
Xecho "All done!"
SHAR_EOF
$TOUCH -am 0704085690 exit-patch &&
chmod 0644 exit-patch ||
echo "restore of exit-patch failed"
set `wc -c exit-patch`;Wc_c=$1
if test "$Wc_c" != "898"; then
	echo original size 898, current size $Wc_c
fi
# ============= gas.diff ==============
echo "x - extracting gas.diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > gas.diff &&
X*** gas-1.36/Makefile.orig	Thu Jun  7 20:21:06 1990
X--- gas-1.36/Makefile	Mon Jul  2 18:17:47 1990
X***************
X*** 1,5 ****
X--- 1,7 ----
X  # Makefile for GAS.
X  # Copyright (C) 1989, Free Software Foundation
X+ #
X+ # Modified for use on HPUX 7.0,  Tom Lane  4/24/90
X  # 
X  # This file is part of GAS, the GNU Assembler.
X  # 
X***************
X*** 24,31 ****
X  
X  # If you are on a BSD system, un-comment the next two lines, and comment out
X  # the lines for SystemV and HPUX below
X! G0 = -g -I.
X! LDFLAGS = $(CFLAGS)
X  #
X  # To compile gas on a System Five machine, comment out the two lines above
X  # and un-comment out the next three lines
X--- 26,33 ----
X  
X  # If you are on a BSD system, un-comment the next two lines, and comment out
X  # the lines for SystemV and HPUX below
X! # G0 = -g -I.
X! # LDFLAGS = $(CFLAGS)
X  #
X  # To compile gas on a System Five machine, comment out the two lines above
X  # and un-comment out the next three lines
X***************
X*** 42,49 ****
X  # if setvbuf is broken.  Re-compile input-file.c (and only input-file.c
X  # with -DVMS and the problem should go away.
X  #
X! # G0 = -g -I. -DUSG
X! # LOADLIBES = alloca.o
X  #
X  # To compile gas for a Sequent Symmetry, comment out all the above lines,
X  # and un-comment the next two lines.
X--- 44,51 ----
X  # if setvbuf is broken.  Re-compile input-file.c (and only input-file.c
X  # with -DVMS and the problem should go away.
X  #
X! G0 = -g -I. -DUSG
X! LOADLIBES = alloca.o -lmalloc
X  #
X  # To compile gas for a Sequent Symmetry, comment out all the above lines,
X  # and un-comment the next two lines.
X***************
X*** 59,65 ****
X  # If you just want to compile the sparc assembler, type 'make asparc'
X  
X  # If you just want to compile the mc68020 assembler, make sure m68k.h
X! # is correctly set up, and type type 'make a68'  (Except on HPUX machines,
X  # where you will have to make the changes marked below before typing
X  # 'make a68'
X  # m68k.h should be a symbolic or hard-link to one of
X--- 61,67 ----
X  # If you just want to compile the sparc assembler, type 'make asparc'
X  
X  # If you just want to compile the mc68020 assembler, make sure m68k.h
X! # is correctly set up, and type 'make a68'  (Except on HPUX machines,
X  # where you will have to make the changes marked below before typing
X  # 'make a68'
X  # m68k.h should be a symbolic or hard-link to one of
X***************
X*** 93,107 ****
X  # (the 32381 is a superset of the 32081), remove the # from the -DNS32381
X  # line below.
X  
X! O1 =  -DNO_VARARGS
X  O2 = # -DNON_BROKEN_WORDS
X  O3 = # -Dm68851
X  O4 = # -DEXEC_VERSION=1
X! O5 = # -DSIGTY=void
X  O6 = # -DNS32532
X  O7 = # -DNS32381
X  G4 = # -DUSE_SYSTEM_HDR
X! G5 = # -DUSE_HP_HDR
X  G6 = # -DSUN_ASM_SYNTAX
X  
X  OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) $(O6) $(O7)
X--- 95,109 ----
X  # (the 32381 is a superset of the 32081), remove the # from the -DNS32381
X  # line below.
X  
X! O1 = # -DNO_VARARGS
X  O2 = # -DNON_BROKEN_WORDS
X  O3 = # -Dm68851
X  O4 = # -DEXEC_VERSION=1
X! O5 = -DSIGTY=void
X  O6 = # -DNS32532
X  O7 = # -DNS32381
X  G4 = # -DUSE_SYSTEM_HDR
X! G5 = -DUSE_HP_HDR
X  G6 = # -DSUN_ASM_SYNTAX
X  
X  OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) $(O6) $(O7)
X***************
X*** 213,218 ****
X--- 215,225 ----
X  
X  a68: $a $y
X  	$(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES)
X+ 
X+ # For HPUX
X+ alloca.o:	alloca.c
X+ 	$(CC) $(CFLAGS) -Dhp9000s300  -E alloca.c >alloca.s
X+ 	as alloca.s -o alloca.o
X  
X  # VAX GAS --------------------------------------------------------------------
X  z = vax.o  atof-vax.o  write.o  read.o
X*** gas-1.36/input-file.c.orig	Wed Mar  1 23:49:09 1989
X--- gas-1.36/input-file.c	Mon Jul  2 18:15:57 1990
X***************
X*** 28,34 ****
X  
X  #ifdef USG
X  #define index strchr
X! #define setbuffer(stream, buf, size) setvbuf((stream), (buf), _IOLBF, (size))
X  #endif
X  
X  #include <stdio.h>
X--- 28,34 ----
X  
X  #ifdef USG
X  #define index strchr
X! #define setbuffer(stream, buf, size) setvbuf((stream), (buf), _IOFBF, (size))
X  #endif
X  
X  #include <stdio.h>
X*** gas-1.36/xmalloc.c.orig	Wed Mar  1 23:48:34 1989
X--- gas-1.36/xmalloc.c	Mon Jul  2 18:16:05 1990
X***************
X*** 47,56 ****
X       long n;
X  {
X    char *	retval;
X    char *	malloc();
X    void	error();
X  
X!   if ( ! (retval = malloc ((unsigned)n)) )
X      {
X        error("virtual memory exceeded");
X      }
X--- 47,58 ----
X       long n;
X  {
X    char *	retval;
X+ #ifndef USG
X    char *	malloc();
X+ #endif
X    void	error();
X  
X!   if ( ! (retval = (char *) malloc ((unsigned)n)) )
X      {
X        error("virtual memory exceeded");
X      }
X*** gas-1.36/xrealloc.c.orig	Wed Mar  1 23:48:33 1989
X--- gas-1.36/xrealloc.c	Mon Jul  2 18:16:16 1990
X***************
X*** 50,59 ****
X  register char  *ptr;
X  long    n;
X  {
X      char   *realloc ();
X      void	error();
X  
X!     if ((ptr = realloc (ptr, (unsigned)n)) == 0)
X  	error ("virtual memory exceeded");
X      return (ptr);
X  }
X--- 50,61 ----
X  register char  *ptr;
X  long    n;
X  {
X+ #ifndef USG
X      char   *realloc ();
X+ #endif
X      void	error();
X  
X!     if ((ptr = (char *) realloc (ptr, (unsigned)n)) == 0)
X  	error ("virtual memory exceeded");
X      return (ptr);
X  }
SHAR_EOF
$TOUCH -am 0702181990 gas.diff &&
chmod 0644 gas.diff ||
echo "restore of gas.diff failed"
set `wc -c gas.diff`;Wc_c=$1
if test "$Wc_c" != "5096"; then
	echo original size 5096, current size $Wc_c
fi
# ============= gcc.diff ==============
echo "x - extracting gcc.diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > gcc.diff &&
X*** gcc-1.37.1/Makefile.orig	Wed Jan 10 23:09:57 1990
X--- gcc-1.37.1/Makefile	Mon Jul  2 18:09:42 1990
X***************
X*** 1,6 ****
X--- 1,8 ----
X  # Makefile for GNU C compiler.
X  #   Copyright (C) 1987, 1988 Free Software Foundation, Inc.
X  
X+ # Modified for HPUX installation, Tom Lane 3/21/90
X+ 
X  #This file is part of GNU CC.
X  
X  #GNU CC is free software; you can redistribute it and/or modify
X***************
X*** 21,34 ****
X  # Variables that exist for you to override.
X  # See below for how to change them for certain systems.
X  
X! CFLAGS = -g $(XCFLAGS)
X  CC = cc
X  BISON = bison
X  BISONFLAGS = -v
X  AR = ar
X  SHELL = /bin/sh
X  # on sysV, define this as cp.
X! INSTALL = install -c
X  
X  # Compiler to use for compiling gnulib.
X  # OLDCC should not be the GNU C compiler.
X--- 23,37 ----
X  # Variables that exist for you to override.
X  # See below for how to change them for certain systems.
X  
X! CFLAGS = -g -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 -Wc,-Nd2000 -I../binutils/hp-include
X  CC = cc
X  BISON = bison
X  BISONFLAGS = -v
X  AR = ar
X+ GAR = gnu-ar
X  SHELL = /bin/sh
X  # on sysV, define this as cp.
X! INSTALL = cp  # install -c
X  
X  # Compiler to use for compiling gnulib.
X  # OLDCC should not be the GNU C compiler.
X***************
X*** 37,55 ****
X  # CFLAGS for use with OLDCC, for compiling gnulib.
X  # NOTE: -O does not work on some Unix systems!
X  # On them, you must take it out.
X! CCLIBFLAGS=-O
X  
X  # CFLAGS for use with OLDCC, for compiling hard-params.
X! HARD_PARAMS_FLAGS=
X  
X  # Directory where sources are, from where we are.
X  srcdir = .
X  # Directory in which to put the executable for the command `gcc'
X! bindir = $(prefix)/usr/local/bin
X  # Directory in which to put the subprograms used by the compiler.
X! libdir = $(prefix)/usr/local/lib
X  # Directory in which to put man pages.
X! mandir = $(prefix)/usr/local/man/man1
X  # Number to put in man-page filename.
X  manext = 1
X  
X--- 40,58 ----
X  # CFLAGS for use with OLDCC, for compiling gnulib.
X  # NOTE: -O does not work on some Unix systems!
X  # On them, you must take it out.
X! CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -O
X  
X  # CFLAGS for use with OLDCC, for compiling hard-params.
X! HARD_PARAMS_FLAGS = -Wc,-Ns2000 -Wc,-Ne700
X  
X  # Directory where sources are, from where we are.
X  srcdir = .
X  # Directory in which to put the executable for the command `gcc'
X! bindir = $(prefix)/usr/local/bin/gnu
X  # Directory in which to put the subprograms used by the compiler.
X! libdir = $(prefix)/usr/local/lib/gnu
X  # Directory in which to put man pages.
X! mandir = $(prefix)/users/gnu/man/man1
X  # Number to put in man-page filename.
X  manext = 1
X  
X***************
X*** 229,242 ****
X  	  $(AR) qc tmpgnulib $${name}.o; \
X  	  rm -f $${name}.[co]; \
X  	done
X! 	if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib tmpgnulib ;fi
X  # Actually build it in tmpgnulib above, then rename now,
X  # so that gnulib itself remains nonexistent if compilation is aborted.
X! 	mv tmpgnulib gnulib
X  # On HPUX, if you are working with the GNU assembler and linker,
X! # the previous two command lines must be replaced with the following line.
X  # No change is needed here if you are using the HPUX assembler and linker.
X! #	../hp-bin/hpxt tmpgnulib gnulib
X  
X  gnulib2: stamp-gnulib2;
X  stamp-gnulib2: gnulib2.c gnulib cc1 gcc cpp $(CONFIG_H)
X--- 232,246 ----
X  	  $(AR) qc tmpgnulib $${name}.o; \
X  	  rm -f $${name}.[co]; \
X  	done
X! #	if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib tmpgnulib ;fi
X  # Actually build it in tmpgnulib above, then rename now,
X  # so that gnulib itself remains nonexistent if compilation is aborted.
X! #	mv tmpgnulib gnulib
X  # On HPUX, if you are working with the GNU assembler and linker,
X! # the previous two command lines must be replaced with the following lines.
X  # No change is needed here if you are using the HPUX assembler and linker.
X! 	../binutils/hp-bin/hpxt tmpgnulib gnulib
X! 	rm tmpgnulib
X  
X  gnulib2: stamp-gnulib2;
X  stamp-gnulib2: gnulib2.c gnulib cc1 gcc cpp $(CONFIG_H)
X***************
X*** 244,253 ****
X  	do \
X  	  echo $${name}; \
X  	  ./gcc -B./ -fstrength-reduce -O $(INCLUDES) $(GNULIB2_CFLAGS) -c -DL$${name} $(srcdir)/gnulib2.c -o $${name}.o; \
X! 	  $(AR) rc gnulib $${name}.o; \
X  	  rm -f $${name}.o; \
X  	done
X! 	if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then  ranlib gnulib ;fi
X  # On HPUX, if you are working with the GNU assembler and linker,
X  # the previous line must be commented out.
X  # No change is needed here if you are using the HPUX assembler and linker.
X--- 248,257 ----
X  	do \
X  	  echo $${name}; \
X  	  ./gcc -B./ -fstrength-reduce -O $(INCLUDES) $(GNULIB2_CFLAGS) -c -DL$${name} $(srcdir)/gnulib2.c -o $${name}.o; \
X! 	  $(GAR) rc gnulib $${name}.o; \
X  	  rm -f $${name}.o; \
X  	done
X! #	if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then  ranlib gnulib ;fi
X  # On HPUX, if you are working with the GNU assembler and linker,
X  # the previous line must be commented out.
X  # No change is needed here if you are using the HPUX assembler and linker.
X***************
X*** 609,633 ****
X  	-mkdir stage1
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage1
X  	-rm -f stage1/gnulib
X! 	-ln gnulib stage1 || (cp gnulib stage1 && ranlib stage1/gnulib)
X  
X  stage2: force
X  	-mkdir stage2
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage2
X  	-rm -f stage2/gnulib
X! 	-ln gnulib stage2 || (cp gnulib stage2 && ranlib stage2/gnulib)
X  
X  stage3: force
X  	-mkdir stage3
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage3
X  	-rm -f stage3/gnulib
X! 	-ln gnulib stage3 || (cp gnulib stage3 && ranlib stage3/gnulib)
X  
X  stage4: force
X  	-mkdir stage4
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage4
X  	-rm -f stage4/gnulib
X! 	-ln gnulib stage4 || (cp gnulib stage4 && ranlib stage4/gnulib)
X  
X  TAGS: force
X  	mkdir temp
X--- 613,637 ----
X  	-mkdir stage1
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage1
X  	-rm -f stage1/gnulib
X! 	cp gnulib stage1 && ranlib stage1/gnulib
X  
X  stage2: force
X  	-mkdir stage2
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage2
X  	-rm -f stage2/gnulib
X! 	cp gnulib stage2 && ranlib stage2/gnulib
X  
X  stage3: force
X  	-mkdir stage3
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage3
X  	-rm -f stage3/gnulib
X! 	cp gnulib stage3 && ranlib stage3/gnulib
X  
X  stage4: force
X  	-mkdir stage4
X  	-mv $(STAGESTUFF) $(STAGE_GCC) stage4
X  	-rm -f stage4/gnulib
X! 	cp gnulib stage4 && ranlib stage4/gnulib
X  
X  TAGS: force
X  	mkdir temp
X*** gcc-1.37.1/gcc.c.orig	Sat Jan  6 22:24:32 1990
X--- gcc-1.37.1/gcc.c	Mon Jul  2 18:09:43 1990
X***************
X*** 231,237 ****
X  struct compiler compilers[] =
X  {
X    {".c",
X!    "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} %{trigraphs} -undef \
X          -D__GNUC__ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!ansi:%p} %P\
X          %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\
X  	%{Wcomment*} %{Wtrigraphs} %{Wall} %C\
X--- 231,237 ----
X  struct compiler compilers[] =
X  {
X    {".c",
X!    "cpp %{nostdinc} %{C} %{v} %{d} %{D*} %{U*} %{I*} %{M*} %{i*} %{trigraphs} -undef \
X          -D__GNUC__ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!ansi:%p} %P\
X          %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\
X  	%{Wcomment*} %{Wtrigraphs} %{Wall} %C\
X***************
X*** 246,252 ****
X  		      %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
X                        %{!pipe:%g.s}\n }}}"},
X    {".cc",
X!    "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} \
X          -undef -D__GNUC__ -D__GNUG__ %p %P\
X          %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\
X  	%{Wcomment*} %{Wtrigraphs} %{Wall} %C\
X--- 246,252 ----
X  		      %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
X                        %{!pipe:%g.s}\n }}}"},
X    {".cc",
X!    "cpp -+ %{nostdinc} %{C} %{v} %{d} %{D*} %{U*} %{I*} %{M*} %{i*} \
X          -undef -D__GNUC__ -D__GNUG__ %p %P\
X          %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\
X  	%{Wcomment*} %{Wtrigraphs} %{Wall} %C\
X***************
X*** 271,277 ****
X     "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
X              %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i\n }"},
X    {".S",
X!    "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{trigraphs} \
X          -undef -D__GNUC__ -$ %p %P\
X          %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\
X  	%{Wcomment*} %{Wtrigraphs} %{Wall} %C\
X--- 271,277 ----
X     "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
X              %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i\n }"},
X    {".S",
X!    "cpp %{nostdinc} %{C} %{v} %{d} %{D*} %{U*} %{I*} %{M*} %{trigraphs} \
X          -undef -D__GNUC__ -$ %p %P\
X          %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\
X  	%{Wcomment*} %{Wtrigraphs} %{Wall} %C\
X***************
X*** 287,293 ****
X  char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
X   %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
X   %{y*} %{!A:%{!nostdlib:%S}} \
X!  %{L*} %o %{!nostdlib:gnulib%s %{g:-lg} %L gnulib%s}\n }}}}";
X  
X  /* Accumulate a command (program name and args), and run it.  */
X  
X--- 287,293 ----
X  char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
X   %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
X   %{y*} %{!A:%{!nostdlib:%S}} \
X!  %{L*} %o %{!nostdlib:gnulib%s %L gnulib%s}\n }}}}";
X  
X  /* Accumulate a command (program name and args), and run it.  */
X  
SHAR_EOF
$TOUCH -am 0702181390 gcc.diff &&
chmod 0644 gcc.diff ||
echo "restore of gcc.diff failed"
set `wc -c gcc.diff`;Wc_c=$1
if test "$Wc_c" != "9188"; then
	echo original size 9188, current size $Wc_c
fi
# ============= gdb.diff ==============
echo "x - extracting gdb.diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > gdb.diff &&
X*** dist-gdb/config.gdb.orig	Tue Jan 30 21:35:46 1990
X--- dist-gdb/config.gdb	Mon Jul  2 18:33:14 1990
X***************
X*** 152,157 ****
X--- 152,160 ----
X  	opcodefile=vax-opcode.h
X  	;;
X  hp9k320)
X+ # Get the kernel _u symbol value, which varies across system versions
X+ 	echo '#define KERNEL_U_ADDR ' \
X+ 		`nm /hp-ux | grep ' _u$' | awk '{print $1}'` >kerneluaddr.h
X  # The headers in the directory hp-include override system headers
X  # and tell GDB to use BSD executable file format (hence -Ihp-include)
X  	makedefine="-DM_SYSV -DM_BSD_NM -DM_REGEX=regex.o 
X*** dist-gdb/dbxread.c.orig	Mon Jul  2 18:33:17 1990
X--- dist-gdb/dbxread.c	Mon Jul  2 18:33:22 1990
X***************
X*** 3569,3575 ****
X  
X  	  /* Record the location of _etext.  */
X  	  if (type == (N_TEXT | N_EXT)
X! 	      && !strcmp (namestring, "_etext"))
X  	    end_of_text_addr = bufp->n_value;
X  
X  #if 0
X--- 3569,3575 ----
X  
X  	  /* Record the location of _etext.  */
X  	  if (type == (N_TEXT | N_EXT)
X! 	      && !strcmp (namestring, "__etext"))
X  	    end_of_text_addr = bufp->n_value;
X  
X  #if 0
X*** dist-gdb/m-hp9k320.h.orig	Tue Feb  6 21:59:39 1990
X--- dist-gdb/m-hp9k320.h	Mon Jul  2 18:33:18 1990
X***************
X*** 88,98 ****
X  /* This is the amount to subtract from u.u_ar0
X     to get the offset in the core file of the register values.  */
X  
X! #ifdef HPUX_VERSION_5
X! #define KERNEL_U_ADDR 0x00979000
X! #else
X! #define KERNEL_U_ADDR 0x00C01000
X! #endif
X  
X  /* Address of end of stack space.  */
X  
X--- 88,94 ----
X  /* This is the amount to subtract from u.u_ar0
X     to get the offset in the core file of the register values.  */
X  
X! #include "kerneluaddr.h"
X  
X  /* Address of end of stack space.  */
X  
X*** dist-gdb/stuff.c.orig	Wed Jul  5 21:46:52 1989
X--- dist-gdb/stuff.c	Mon Jul  2 18:33:23 1990
X***************
X*** 129,135 ****
X  
X    /* Find the core address at which the first byte of kdb text segment
X       should be loaded into core when kdb is run.  */
X!   origin = find_symbol ("_etext", symbol_table, file_hdr.a_syms, strings)
X      - file_hdr.a_text;
X    /* Find the core address at which the heap will appear.  */
X    coreaddr = find_symbol (sym_name, symbol_table, file_hdr.a_syms, strings);
X--- 129,135 ----
X  
X    /* Find the core address at which the first byte of kdb text segment
X       should be loaded into core when kdb is run.  */
X!   origin = find_symbol ("__etext", symbol_table, file_hdr.a_syms, strings)
X      - file_hdr.a_text;
X    /* Find the core address at which the heap will appear.  */
X    coreaddr = find_symbol (sym_name, symbol_table, file_hdr.a_syms, strings);
X*** dist-gdb/malloc.c.orig	Sat Sep 30 20:48:54 1989
X--- dist-gdb/malloc.c	Mon Jul  2 18:33:24 1990
X***************
X*** 187,193 ****
X  #endif
X  
X  #ifndef emacs
X! #define start_of_data() &etext
X  #endif
X  
X  #define ISALLOC ((char) 0xf7)	/* magic byte that implies allocation */
X--- 187,193 ----
X  #endif
X  
X  #ifndef emacs
X! #define start_of_data() &_etext
X  #endif
X  
X  #define ISALLOC ((char) 0xf7)	/* magic byte that implies allocation */
X***************
X*** 198,204 ****
X  				     being the distance to the true
X  				     beginning of the block.  */
X  
X! extern char etext;
X  
X  /* These two are for user programs to look at, when they are interested.  */
X  
X--- 198,204 ----
X  				     being the distance to the true
X  				     beginning of the block.  */
X  
X! extern char _etext;
X  
X  /* These two are for user programs to look at, when they are interested.  */
X  
SHAR_EOF
$TOUCH -am 0702183390 gdb.diff &&
chmod 0644 gdb.diff ||
echo "restore of gdb.diff failed"
set `wc -c gdb.diff`;Wc_c=$1
if test "$Wc_c" != "3462"; then
	echo original size 3462, current size $Wc_c
fi
exit 0


jand@kuling.UUCP (Jan Dj{rv) (07/04/90)

#!/bin/sh
# This is a shell archive (shar 3.30)
# made 07/04/1990 08:23 UTC by jhd@irfu.se
# Source directory /users/nobackup/data/jhd
#
# existing files WILL be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   7414 -rw-r--r-- g++.diff
#  10007 -rw-r--r-- libg++.diff
#
if touch 2>&1 | fgrep 'mmdd' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= g++.diff ==============
echo "x - extracting g++.diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > g++.diff &&
X*** g++/Makefile.orig	Mon Feb 26 15:37:46 1990
X--- g++/Makefile	Mon Jul  2 18:40:18 1990
X***************
X*** 46,52 ****
X  # HAVE_UNISTD_H = -DNO_UNISTD_H
X  
X  # CFLAGS = -g -DSOS -DESKIT -O
X! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/
X  CC = gcc
X  BISON = bison
X  BISONFLAGS = -v -d
X--- 46,52 ----
X  # HAVE_UNISTD_H = -DNO_UNISTD_H
X  
X  # CFLAGS = -g -DSOS -DESKIT -O
X! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/ -I../binutils/hp-include
X  CC = gcc
X  BISON = bison
X  BISONFLAGS = -v -d
X***************
X*** 53,59 ****
X  AR = ar
X  SHELL = /bin/sh
X  # on sysV, define this as cp.
X! INSTALL = install -c
X  # on sysV, define this as ln.
X  LINK = ln -s
X  
X--- 53,59 ----
X  AR = ar
X  SHELL = /bin/sh
X  # on sysV, define this as cp.
X! INSTALL = cp
X  # on sysV, define this as ln.
X  LINK = ln -s
X  
X***************
X*** 71,77 ****
X  # uncomment the following line.  But turncoats who claim officially
X  # to support System V, but really try to be Berkeley (and thus
X  # break with USG defined), may need to define this.
X! # USG_STDIO = -DUSG_STDIO
X  
X  prefix=/usr/local
X  
X--- 71,77 ----
X  # uncomment the following line.  But turncoats who claim officially
X  # to support System V, but really try to be Berkeley (and thus
X  # break with USG defined), may need to define this.
X! USG_STDIO = -DUSG_STDIO
X  
X  prefix=/usr/local
X  
X***************
X*** 80,88 ****
X  # Directory in which to put the executable for the command `g++'
X  bindir = $(prefix)/bin
X  # Directory in which to put the subprograms used by the compiler.
X! libdir = $(prefix)/lib
X  # Directory in which to put the crt0+.o, crt1+.o, and other such files.
X! startdir = $(prefix)/lib
X  # Directory in which to put man pages.
X  mandir = $(prefix)/man/man1
X  # Number to put in man-page filename.
X--- 80,88 ----
X  # Directory in which to put the executable for the command `g++'
X  bindir = $(prefix)/bin
X  # Directory in which to put the subprograms used by the compiler.
X! libdir = $(prefix)/lib/gnu
X  # Directory in which to put the crt0+.o, crt1+.o, and other such files.
X! startdir = $(prefix)/lib/gnu
X  # Directory in which to put man pages.
X  mandir = $(prefix)/man/man1
X  # Number to put in man-page filename.
X***************
X*** 257,263 ****
X  		DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
X  	elif cmp -s tm.h config/tm-hp9k320g.h; then \
X  		OPTS='-Dmc68020 -DNON_NATIVE -DUSG' \
X! 		DFLTS='"$(libdir)/gnu", "/lib", "/usr/lib", "/usr/local/lib"'; \
X  	elif cmp -s tm.h config/tm-altos3068.h; then \
X  		OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \
X  	elif cmp -s tm.h config/tm-newsgas.h; then \
X--- 257,263 ----
X  		DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
X  	elif cmp -s tm.h config/tm-hp9k320g.h; then \
X  		OPTS='-Dmc68020 -DNON_NATIVE -DUSG' \
X! 		DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
X  	elif cmp -s tm.h config/tm-altos3068.h; then \
X  		OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \
X  	elif cmp -s tm.h config/tm-newsgas.h; then \
X***************
X*** 277,283 ****
X  	fi
X  
X  ld++: ld.o cplus-dem.o
X! 	$(CC) -o ld++ $(PROFILE) ld.o cplus-dem.o -lg -lc
X  
X  collect: collect.c config.h $(LIBDEPS)
X  	COLLECT_LIBS="-lld"; \
X--- 277,283 ----
X  	fi
X  
X  ld++: ld.o cplus-dem.o
X! 	$(CC) -o ld++ $(PROFILE) ld.o cplus-dem.o -lc
X  
X  collect: collect.c config.h $(LIBDEPS)
X  	COLLECT_LIBS="-lld"; \
X*** g++/cplus-decl.c.orig	Mon Feb 26 15:36:42 1990
X--- g++/cplus-decl.c	Mon Jul  2 18:40:21 1990
X***************
X*** 2312,2318 ****
X    return t;
X  }
X  
X! static int sigsegv ()
X  {
X    error ("Segmentation violation");
X    signal (SIGSEGV, SIG_DFL);
X--- 2312,2318 ----
X    return t;
X  }
X  
X! static void sigsegv ()
X  {
X    error ("Segmentation violation");
X    signal (SIGSEGV, SIG_DFL);
X*** g++/toplev.c.orig	Fri Feb  9 00:32:34 1990
X--- g++/toplev.c	Mon Jul  2 18:40:23 1990
X***************
X*** 1936,1942 ****
X    file_size = lseek(file, 0L, SEEK_END);
X    lseek(file, 0L, SEEK_SET);
X    brk((char*)(&my_edata) + file_size);
X!   if (read (file, &my_edata, file_size) != file_size)
X      perror(name);
X  }
X  
X--- 1936,1942 ----
X    file_size = lseek(file, 0L, SEEK_END);
X    lseek(file, 0L, SEEK_SET);
X    brk((char*)(&my_edata) + file_size);
X!   if (read (file, (char *)&my_edata, file_size) != file_size)
X      perror(name);
X  }
X  
X***************
X*** 1985,1991 ****
X    signal (SIGPIPE, pipe_closed);
X  
X    decl_printable_name = decl_name;
X!   lang_expand_expr = fancy_abort;
X  
X    /* Initialize whether `char' is signed.  */
X    flag_signed_char = DEFAULT_SIGNED_CHAR;
X--- 1985,1991 ----
X    signal (SIGPIPE, pipe_closed);
X  
X    decl_printable_name = decl_name;
X!   lang_expand_expr = (struct rtx_def *(*)())fancy_abort;
X  
X    /* Initialize whether `char' is signed.  */
X    flag_signed_char = DEFAULT_SIGNED_CHAR;
X*** g++/ld.c.orig	Mon Jul  2 18:39:18 1990
X--- g++/ld.c	Mon Jul  2 18:40:24 1990
X***************
X*** 4429,4437 ****
X  symtab_init ()
X  {
X  #ifndef nounderscore
X!   edata_symbol = getsym ("_edata");
X!   etext_symbol = getsym ("_etext");
X!   end_symbol = getsym ("_end");
X  #else
X    edata_symbol = getsym ("edata");
X    etext_symbol = getsym ("etext");
X--- 4429,4437 ----
X  symtab_init ()
X  {
X  #ifndef nounderscore
X!   edata_symbol = getsym ("__edata");
X!   etext_symbol = getsym ("__etext");
X!   end_symbol = getsym ("__end");
X  #else
X    edata_symbol = getsym ("edata");
X    etext_symbol = getsym ("etext");
X***************
X*** 4746,4751 ****
X--- 4746,4752 ----
X  
X  #endif
X  
X+ #ifdef sun
X  #if TARGET == SUN4
X  
X  /* Don't use local pagesize to build for Sparc.  */
X***************
X*** 4754,4757 ****
X--- 4755,4759 ----
X  {
X    return (8192);
X  }
X+ #endif
X  #endif
X*** g++/cplus-dem.c.orig	Sat Feb 17 05:40:07 1990
X--- g++/cplus-dem.c	Mon Jul  2 18:40:25 1990
X***************
X*** 48,53 ****
X--- 48,54 ----
X  #include <stdio.h>
X  #include <string.h>
X  #include <ctype.h>
X+ #include "config.h"
X  
X  #ifdef USG
X  #include <memory.h>
X***************
X*** 203,209 ****
X  	  return tem;
X  	}
X        /* static data member */
X!       if (*type != '_' && (p = strchr (type, '$')) != NULL)
X  	{
X  	  int n = strlen (type) + 2;
X  	  char *tem = (char *) xmalloc (n);
X--- 204,210 ----
X  	  return tem;
X  	}
X        /* static data member */
X!       if (*type != '_' && (p = (char *)strchr (type, '$')) != NULL)
X  	{
X  	  int n = strlen (type) + 2;
X  	  char *tem = (char *) xmalloc (n);
X*** g++/malloc.c.orig	Sat Feb 17 05:34:08 1990
X--- g++/malloc.c	Mon Jul  2 18:40:26 1990
X***************
X*** 178,189 ****
X  
X  #ifdef BSD
X  #ifndef DATA_SEG_BITS
X! #define start_of_data() &etext
X  #endif
X  #endif
X  
X  #ifndef emacs
X! #define start_of_data() &etext
X  #endif
X  
X  #define ISALLOC ((char) 0xf7)	/* magic byte that implies allocation */
X--- 178,189 ----
X  
X  #ifdef BSD
X  #ifndef DATA_SEG_BITS
X! #define start_of_data() &_etext
X  #endif
X  #endif
X  
X  #ifndef emacs
X! #define start_of_data() &_etext
X  #endif
X  
X  #define ISALLOC ((char) 0xf7)	/* magic byte that implies allocation */
X***************
X*** 194,200 ****
X  				     being the distance to the true
X  				     beginning of the block.  */
X  
X! extern char etext;
X  
X  /* These two are for user programs to look at, when they are interested.  */
X  
X--- 194,200 ----
X  				     being the distance to the true
X  				     beginning of the block.  */
X  
X! extern char _etext;
X  
X  /* These two are for user programs to look at, when they are interested.  */
X  
SHAR_EOF
$TOUCH -am 0702184090 g++.diff &&
chmod 0644 g++.diff ||
echo "restore of g++.diff failed"
set `wc -c g++.diff`;Wc_c=$1
if test "$Wc_c" != "7414"; then
	echo original size 7414, current size $Wc_c
fi
# ============= libg++.diff ==============
echo "x - extracting libg++.diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > libg++.diff &&
X*** libg++-1.37.0/g++-include/sys/param.h.orig	Tue Sep  5 13:04:07 1989
X--- libg++-1.37.0/g++-include/sys/param.h	Mon Jul  2 18:42:21 1990
X***************
X*** 6,14 ****
X  extern "C"
X  {
X  
X- #define KERNEL
X  #include "//usr/include/sys/param.h"
X- #undef KERNEL
X  
X  #ifndef param_h
X  #define param_h 1
X--- 6,12 ----
X*** libg++-1.37.0/g++-include/std.h.orig	Sat Feb 24 20:48:13 1990
X--- libg++-1.37.0/g++-include/std.h	Mon Jul  2 18:42:21 1990
X***************
X*** 48,59 ****
X  int       chdir(const char*);
X  int       chmod(const char*, int);
X  int       chown(const char*, int, int);
X! long      clock(void);
X  int       close(int);
X  #ifdef DGUX
X  int       creat(char*, unsigned long int);
X  #else
X! int       creat(const char*, unsigned long int);
X  #endif
X  char*     crypt(const char*, const char*);
X  char*     ctermid(char*);
X--- 48,59 ----
X  int       chdir(const char*);
X  int       chmod(const char*, int);
X  int       chown(const char*, int, int);
X! unsigned long      clock(void);
X  int       close(int);
X  #ifdef DGUX
X  int       creat(char*, unsigned long int);
X  #else
X! int       creat(const char*, unsigned short int);
X  #endif
X  char*     crypt(const char*, const char*);
X  char*     ctermid(char*);
X***************
X*** 78,84 ****
X  int       fcntl(int, int, ...);
X  char*     fcvt(double, int, int*, int*);
X  int       ffs(int);
X! int       flock(int, int);
X  int       fork(void);
X  void      free(void*);
X  int       fsync(int);
X--- 78,84 ----
X  int       fcntl(int, int, ...);
X  char*     fcvt(double, int, int*, int*);
X  int       ffs(int);
X! /* int       flock(int, int); */
X  int       fork(void);
X  void      free(void*);
X  int       fsync(int);
X*** libg++-1.37.0/g++-include/stdio.h.orig	Mon Jan 15 19:45:42 1990
X--- libg++-1.37.0/g++-include/stdio.h	Mon Jul  2 18:42:21 1990
X***************
X*** 92,98 ****
X  #define HAVE_SETLINEBUF
X  #define IOBUF_FLAG_TYPE	int
X  #define IOBUF_FILE_TYPE	int
X! #define _NFILE 64
X  #define IOBUF_EXTRA_FIELDS	int _reserve[27];
X  #define SPRINTF_RETURNS_INT
X  #define BUFEND_ENTRY_TYPE unsigned char *
X--- 92,98 ----
X  #define HAVE_SETLINEBUF
X  #define IOBUF_FLAG_TYPE	int
X  #define IOBUF_FILE_TYPE	int
X! #define _NFILE 60
X  #define IOBUF_EXTRA_FIELDS	int _reserve[27];
X  #define SPRINTF_RETURNS_INT
X  #define BUFEND_ENTRY_TYPE unsigned char *
X***************
X*** 114,120 ****
X  #endif
X  
X  #ifdef hpux
X! #define IOBUF_FLAG_TYPE char
X  #endif
X  
X  #ifdef USG
X--- 114,120 ----
X  #endif
X  
X  #ifdef hpux
X! #define IOBUF_FLAG_TYPE short
X  #endif
X  
X  #ifdef USG
X***************
X*** 141,147 ****
X  #endif
X  
X  #if defined(USG) && !defined(_NFILE)
X! #define _NFILE 20
X  #endif
X  
X  #ifdef USG
X--- 141,147 ----
X  #endif
X  
X  #if defined(USG) && !defined(_NFILE)
X! #define _NFILE 60
X  #endif
X  
X  #ifdef USG
X***************
X*** 156,170 ****
X  #endif
X  
X  /* check this -- hardly any systems need this these days */
X! /* #define SPRINTF_RETURNS_INT */
X  
X  /* check and possibly redefine the following */
X  #define BUFSIZ  1024            
X  
X  extern  struct  _iobuf {
X!     int      _cnt;
X!     char*    _ptr;
X!     char*    _base;
X      IOBUF_BUFSIZ_FIELD
X      IOBUF_FLAG_TYPE	_flag;
X      IOBUF_FILE_TYPE	_file;
X--- 156,170 ----
X  #endif
X  
X  /* check this -- hardly any systems need this these days */
X! #define SPRINTF_RETURNS_INT
X  
X  /* check and possibly redefine the following */
X  #define BUFSIZ  1024            
X  
X  extern  struct  _iobuf {
X! 	int	_cnt;
X! 	char	*_ptr;
X! 	char	*_base;
X      IOBUF_BUFSIZ_FIELD
X      IOBUF_FLAG_TYPE	_flag;
X      IOBUF_FILE_TYPE	_file;
X*** libg++-1.37.0/g++-include/math.h.orig	Sat Jan  6 15:09:52 1990
X--- libg++-1.37.0/g++-include/math.h	Mon Jul  2 18:42:22 1990
X***************
X*** 88,94 ****
X  double  gamma(double);
X  double  hypot(double,double);
X  double  infnan(int);
X! #if !defined(sequent) && !defined(DGUX) /* see below */
X  int     isinf(double);
X  int     isnan(double);
X  #endif
X--- 88,94 ----
X  double  gamma(double);
X  double  hypot(double,double);
X  double  infnan(int);
X! #if !defined(sequent) && !defined(DGUX) && !defined(hpux)/* see below */
X  int     isinf(double);
X  int     isnan(double);
X  #endif
X***************
X*** 154,160 ****
X  #endif
X  
X  /* sequents don't supply these. The following should suffice */
X! #if defined(sequent) || defined(DGUX)
X  static inline int isnan(double x) { return x != x; }
X  static inline int isinf(double x) { return x > MAXDOUBLE || x < -MAXDOUBLE; }
X  #endif
X--- 154,160 ----
X  #endif
X  
X  /* sequents don't supply these. The following should suffice */
X! #if defined(sequent) || defined(DGUX) || defined(hpux)
X  static inline int isnan(double x) { return x != x; }
X  static inline int isinf(double x) { return x > MAXDOUBLE || x < -MAXDOUBLE; }
X  #endif
X*** libg++-1.37.0/g++-include/time.h.orig	Mon Feb 26 22:03:35 1990
X--- libg++-1.37.0/g++-include/time.h	Mon Jul  2 18:42:22 1990
X***************
X*** 24,30 ****
X  
X  #define KERNEL
X  
X! #ifndef USG
X  #include "//usr/include/sys/time.h"
X  #endif
X  #include "//usr/include/sys/times.h"
X--- 24,33 ----
X  
X  #define KERNEL
X  
X! #if !defined(USG) || defined(hpux)
X! #ifdef hpux
X! #define _INCLUDE_POSIX_SOURCE
X! #endif
X  #include "//usr/include/sys/time.h"
X  #endif
X  #include "//usr/include/sys/times.h"
X***************
X*** 51,65 ****
X  extern void tzset();
X  extern void tzsetwall();
X  
X  extern long times(struct tms*);
X  
X! #if defined(USG)
X  extern long timezone;
X  extern int daylight;
X  extern char* tzname[];
X  #else
X  typedef struct c_proto_timezone timezone;
X  extern char* timezone(int, int);
X  extern int getitimer(int, struct itimerval*);
X  extern int setitimer(int, struct itimerval*, struct itimerval*);
X  extern int gettimeofday(struct timeval*, struct timezone*);
X--- 54,79 ----
X  extern void tzset();
X  extern void tzsetwall();
X  
X+ #ifdef hpux
X+ extern unsigned long times(struct tms*);
X+ #else
X  extern long times(struct tms*);
X+ #endif
X  
X! #if defined(USG) && !defined (hpux)
X  extern long timezone;
X  extern int daylight;
X  extern char* tzname[];
X  #else
X  typedef struct c_proto_timezone timezone;
X+ #ifdef hpux
X+ #undef timezone
X+ extern long timezone;
X+ extern int daylight;
X+ extern char* tzname[];
X+ #else
X  extern char* timezone(int, int);
X+ #endif
X  extern int getitimer(int, struct itimerval*);
X  extern int setitimer(int, struct itimerval*, struct itimerval*);
X  extern int gettimeofday(struct timeval*, struct timezone*);
X*** libg++-1.37.0/tests/Makefile.orig	Wed Feb 28 11:14:07 1990
X--- libg++-1.37.0/tests/Makefile	Mon Jul  2 18:42:23 1990
X***************
X*** 215,221 ****
X  	
X  libtest.a: $(LHDRS) $(LOBJS)
X  	rm -f libtest.a
X! 	ar r libtest.a $(LOBJS)
X  	$(RANLIB) libtest.a
X  
X  test0: test0.h  test.hello.o test.bye test.bye2 test.shell
X--- 215,221 ----
X  	
X  libtest.a: $(LHDRS) $(LOBJS)
X  	rm -f libtest.a
X! 	gnu-ar r libtest.a $(LOBJS)
X  	$(RANLIB) libtest.a
X  
X  test0: test0.h  test.hello.o test.bye test.bye2 test.shell
X*** libg++-1.37.0/src/Makefile.orig	Wed Feb 28 11:14:22 1990
X--- libg++-1.37.0/src/Makefile	Mon Jul  2 18:42:23 1990
X***************
X*** 166,172 ****
X  
X  libg++.a: $(OBJS)
X  	rm -f libg++.a
X! 	ar r libg++.a $(OBJS)
X  	$(RANLIB) libg++.a
X  
X  clean:
X--- 166,172 ----
X  
X  libg++.a: $(OBJS)
X  	rm -f libg++.a
X! 	gnu-ar r libg++.a $(OBJS)
X  	$(RANLIB) libg++.a
X  
X  clean:
X*** libg++-1.37.0/src/malloc.c.orig	Wed Feb  7 15:22:02 1990
X--- libg++-1.37.0/src/malloc.c	Mon Jul  2 18:42:24 1990
X***************
X*** 205,211 ****
X  extern "C" {
X  #endif
X  
X! #ifdef USG
X  extern void*     memset(void*, int, int);
X  extern void*     memcpy(void*,  const void*, int);
X  inline void      bzero(void* s, int l) { memset(s, 0, l); }
X--- 205,211 ----
X  extern "C" {
X  #endif
X  
X! #if defined(USG) || defined(hpux)
X  extern void*     memset(void*, int, int);
X  extern void*     memcpy(void*,  const void*, int);
X  inline void      bzero(void* s, int l) { memset(s, 0, l); }
X*** libg++-1.37.0/Makefile.orig	Wed Feb 28 11:17:18 1990
X--- libg++-1.37.0/Makefile	Mon Jul  2 18:42:24 1990
X***************
X*** 28,35 ****
X  # ------ source locations
X  
X  # Manually set PWD to *this* directory if you are not using gnu make
X! PWD := $(shell pwd)
X! #PWD=/home/dl/libg++
X  
X  # source include directory 
X  SRCIDIR= $(PWD)/g++-include
X--- 28,35 ----
X  # ------ source locations
X  
X  # Manually set PWD to *this* directory if you are not using gnu make
X! #PWD := $(shell pwd)
X! PWD=/users/jhd/gnu/libg++-1.37.0
X  
X  # source include directory 
X  SRCIDIR= $(PWD)/g++-include
X***************
X*** 41,56 ****
X  # set `prefix' to something else if you want to install things
X  # in nonstandard places
X  
X! prefix =/usr/gnu
X  
X  # libg++.a destination
X! LIBDIR = $(prefix)/lib
X  
X  # executables directory: location to install the genclass class generator
X  BINDIR = $(prefix)/bin
X  
X  # location to install include file directory
X! IDIR = $(prefix)/lib/g++-include
X  
X  
X  # ------- System-dependent defines
X--- 41,56 ----
X  # set `prefix' to something else if you want to install things
X  # in nonstandard places
X  
X! prefix =/usr/local
X  
X  # libg++.a destination
X! LIBDIR = $(prefix)/lib/gnu
X  
X  # executables directory: location to install the genclass class generator
X  BINDIR = $(prefix)/bin
X  
X  # location to install include file directory
X! IDIR = $(prefix)/lib/gnu/g++-include
X  
X  
X  # ------- System-dependent defines
X***************
X*** 57,64 ****
X  # ------- use the second form of each for SystemV (USG)
X  
X  # g++ flags
X! OSFLAG=
X! #OSFLAG = -DUSG
X  
X  # other compilation control flags -- use any combination
X  
X--- 57,64 ----
X  # ------- use the second form of each for SystemV (USG)
X  
X  # g++ flags
X! #OSFLAG=
X! OSFLAG = -DUSG
X  
X  # other compilation control flags -- use any combination
X  
X***************
X*** 86,96 ****
X  #OSLDFLAG= -lPW
X  
X  # how to install
X! INSTALL=install -c
X! #INSTALL=cp
X  
X  # ranlib if necessary
X! RANLIB=ranlib
X  #RANLIB=echo
X  
X  # which make?
X--- 86,96 ----
X  #OSLDFLAG= -lPW
X  
X  # how to install
X! #INSTALL=install -c
X! INSTALL=cp
X  
X  # ranlib if necessary
X! RANLIB=gnu-ranlib
X  #RANLIB=echo
X  
X  # which make?
SHAR_EOF
$TOUCH -am 0702184290 libg++.diff &&
chmod 0644 libg++.diff ||
echo "restore of libg++.diff failed"
set `wc -c libg++.diff`;Wc_c=$1
if test "$Wc_c" != "10007"; then
	echo original size 10007, current size $Wc_c
fi
exit 0