diff -ru ../gcc-2.7.2.1.orig/Makefile.in ./Makefile.in
--- ../gcc-2.7.2.1.orig/Makefile.in	Sun Nov 26 14:44:25 1995
+++ ./Makefile.in	Wed Sep 18 02:37:22 1996
@@ -245,7 +245,7 @@
 # -g1 causes output of debug info only for file-scope entities.
 # we use this here because that should be enough, and also
 # so that -g1 will be tested.
-LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1
+LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1 -g0
 
 # Additional options to use when compiling libgcc2.a.
 # Some targets override this to -Iinclude
@@ -746,6 +746,7 @@
 libgcc1.null: $(GCC_PASSES)
 	echo "__foo () {}" > dummy.c
 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
+	ld -r -x dummy$(objext); mv a.out dummy$(objext)
 	$(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
 	rm -f dummy$(objext) dummy.c
 
@@ -777,6 +778,7 @@
 	  $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
 	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
 	  mv libgcc1$(objext) $${name}$(objext); \
+	  ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
 	  $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
 	  rm -f $${name}$(objext); \
 	done
@@ -796,6 +798,7 @@
 	    else true; fi; \
 	    $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
 	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+	    ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
 	    $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
 	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
 	    rm -f $${name}.s $${name}$(objext); \
@@ -825,6 +828,7 @@
 	  $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
 	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
 	  mv libgcc1$(objext) $${name}$(objext); \
+	  ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
 	  $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
 	  rm -f $${name}$(objext); \
 	done
@@ -875,6 +879,7 @@
 	  $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
 	      $(srcdir)/libgcc2.c -o $${name}$(objext); \
 	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+	  ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
 	  $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
 	  rm -f $${name}$(objext); \
 	done
@@ -895,6 +900,7 @@
 	    else true; fi; \
 	    $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
 	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+	    ld -r -x $${oname}$(objext); mv a.out $${oname}$(objext); \
 	    $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
 	    rm -f $${name}.s $${oname}$(objext); \
 	  else true; \
diff -ru ../gcc-2.7.2.1.orig/cccp.1 ./cccp.1
--- ../gcc-2.7.2.1.orig/cccp.1	Thu Mar 30 07:22:44 1995
+++ ./cccp.1	Wed Sep 18 02:56:47 1996
@@ -1,13 +1,13 @@
 .\" Copyright (c) 1991, 1992, 1993 Free Software Foundation       \-*-Text-*-
 .\" See section COPYING for conditions for redistribution
-.TH cpp 1 "30apr1993" "GNU Tools" "GNU Tools"
+.TH cpp 1 "April 30, 1993" "FreeBSD" "GNU Tools"
 .SH NAME
-cccp, cpp \- The GNU C-Compatible Compiler Preprocessor.
+cpp \- The GNU C-Compatible Compiler Preprocessor.
 .SH SYNOPSIS
 .hy 0
 .na
 .TP
-.B cccp
+.B cpp
 .RB "[\|" \-$ "\|]"
 .RB "[\|" \-A \c
 .I predicate\c
@@ -142,13 +142,6 @@
 Most often when you use the C preprocessor you will not have to invoke it
 explicitly: the C compiler will do so automatically.  However, the
 preprocessor is sometimes useful individually.
-
-When you call the preprocessor individually, either name
-(\c
-.B cpp\c
-\& or \c
-.B cccp\c
-\&) will do\(em\&they are completely synonymous.
 
 The C preprocessor expects two file names as arguments, \c
 .I infile\c
diff -ru ../gcc-2.7.2.1.orig/cccp.c ./cccp.c
--- ../gcc-2.7.2.1.orig/cccp.c	Thu Oct 26 18:07:26 1995
+++ ./cccp.c	Wed Sep 18 02:40:54 1996
@@ -4923,6 +4923,7 @@
   register char *from;
   char *p, *dir;
 
+#ifndef FREEBSD_NATIVE
   if (searchptr && ! searchptr->got_name_map)
     {
       searchptr->name_map = read_name_map (searchptr->fname
@@ -4945,6 +4946,7 @@
 	    }
 	}
     }
+#endif
 
   /* Try to find a mapping file for the particular directory we are
      looking in.  Thus #include <sys/types.h> will look up sys/types.h
@@ -4981,9 +4983,11 @@
       dir[p - filename] = '\0';
       from = p + 1;
     }
+#ifndef FREEBSD_NATIVE
   for (map = read_name_map (dir); map; map = map->map_next)
     if (! strcmp (map->map_from, from))
       return open (map->map_to, O_RDONLY, 0666);
+#endif
 
   return open (filename, O_RDONLY, 0666);
 }
Only in ./config/i386: freebsd-elf.h
diff -ru ../gcc-2.7.2.1.orig/config/i386/freebsd.h ./config/i386/freebsd.h
--- ../gcc-2.7.2.1.orig/config/i386/freebsd.h	Sat Jun 29 12:27:16 1996
+++ ./config/i386/freebsd.h	Fri May  2 22:58:54 1997
@@ -20,9 +20,6 @@
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* This goes away when the math-emulator is fixed */
-#define TARGET_CPU_DEFAULT 0400		/* TARGET_NO_FANCY_MATH_387 */
-
 /* This is tested by i386gas.h.  */
 #define YES_UNDERSCORES
 
@@ -33,13 +30,82 @@
 
 /* Get perform_* macros to build libgcc.a.  */
 #include "i386/perform.h"
+
+/* This was cloned from ../netbsd.h.  It and several other things in
+   this file should be in ../freebsd.h.  */
+/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD
+   source tree so it can be configured appropriately without using
+   the GNU configure/build mechanism. */
+
+#ifdef FREEBSD_NATIVE
+
+/* Look for the include files in the system-defined places.  */
+
+#define GPLUSPLUS_INCLUDE_DIR		"/usr/include/g++"
+
+#define GCC_INCLUDE_DIR			"/usr/include"
+
+/* FreeBSD has GCC_INCLUDE_DIR first.  */
+#define INCLUDE_DEFAULTS		\
+  {					\
+    { GCC_INCLUDE_DIR, 0, 0 },		\
+    { GPLUSPLUS_INCLUDE_DIR, 1, 1 },	\
+    { 0, 0, 0 }				\
+  }
+
+/* Under FreeBSD, the normal location of the compiler back ends is the
+   /usr/libexec directory.  */
+
+#define STANDARD_EXEC_PREFIX		"/usr/libexec/"
+
+/* Under FreeBSD, the normal location of the various *crt*.o files is the
+   /usr/lib directory.  */
+
+#define STANDARD_STARTFILE_PREFIX	"/usr/lib/"
+
+/* On FreeBSD, gcc is called 'cc' */
+#define GCC_NAME			"cc"
 
+/* FreeBSD is 4.4BSD derived */
+#define bsd4_4
+
+#endif /* FREEBSD_NATIVE */
+
+#define MASK_PROFILER_EPILOGUE	010000000000
+
+#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE)
+
+#undef	SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES						\
+     { "profiler-epilogue",	 MASK_PROFILER_EPILOGUE},		\
+     { "no-profiler-epilogue",	-MASK_PROFILER_EPILOGUE},
+
+
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=3 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+
+#define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
 
-/* Like the default, except no -lg.  */
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+/* Like the default, except no -lg, and no -p.  */
+#define LIB_SPEC "%{!shared:%{!pg:%{!pthread:-lc}%{pthread:-lc_r}}%{pg:%{!pthread:-lc_p}%{pthread:-lc_r_p}}}"
 
+#define LINK_SPEC \
+  "%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
+   %{shared:-Bshareable} \
+   %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
+   %{pg:-Bstatic} %{Z}} \
+   %{assert*} %{R*}"
+
+#define LINK_LIBGCC_SPECIAL_1	1
+
+#define STARTFILE_SPEC  \
+  "%{shared:c++rt0.o%s} \
+   %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}"
+
+/* This goes away when the math emulator is fixed.  */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT	(MASK_NO_FANCY_MATH_387 | 0301)
+
 #undef SIZE_TYPE
 #define SIZE_TYPE "unsigned int"
 
@@ -47,19 +113,21 @@
 #define PTRDIFF_TYPE "int"
 
 #undef WCHAR_TYPE
-#define WCHAR_TYPE "short unsigned int"
+#define WCHAR_TYPE "int"
 
-#define WCHAR_UNSIGNED 1
+#define WCHAR_UNSIGNED 0
 
 #undef WCHAR_TYPE_SIZE
-#define WCHAR_TYPE_SIZE 16
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
 
 #define HAVE_ATEXIT
 
-/* There are conflicting reports about whether this system uses
-   a different assembler syntax.  wilson@cygnus.com says # is right.  */
-#undef COMMENT_BEGIN
-#define COMMENT_BEGIN "#"
+#define HAVE_PUTENV
+
+/* Override the default comment-starter of "/".  */
+
+#undef ASM_COMMENT_START
+#define ASM_COMMENT_START "#"
 
 #undef ASM_APP_ON
 #define ASM_APP_ON "#APP\n"
@@ -86,31 +154,40 @@
 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
    we want to retain compatibility with older gcc versions.  */
 #define DEFAULT_PCC_STRUCT_RETURN 0
-
-/* Profiling routines, partially copied from i386/osfrose.h.  */
 
-/* Redefine this to use %eax instead of %edx.  */
+/* Tell final.c that we don't need a label passed to mcount.  */
+
+#define NO_PROFILE_DATA
+
+/* Redefine this to not pass an unused label in %edx.  */
+
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
 {									\
   if (flag_pic)								\
-    {									\
-      fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n",		\
-	       LPREFIX, (LABELNO));					\
-      fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");			\
-    }									\
+    fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");			\
   else									\
+    fprintf (FILE, "\tcall mcount\n");					\
+}
+
+#define FUNCTION_PROFILER_EPILOGUE(FILE)  \
+{									\
+  if (TARGET_PROFILER_EPILOGUE)						\
     {									\
-      fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO));	\
-      fprintf (FILE, "\tcall mcount\n");				\
+      if (flag_pic)							\
+	fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n");		\
+      else								\
+	fprintf (FILE, "\tcall mexitcount\n");				\
     }									\
 }
-
+
 /*
  * Some imports from svr4.h in support of shared libraries.
  * Currently, we need the DECLARE_OBJECT_SIZE stuff.
  */
 
+#define HANDLE_SYSV_PRAGMA
+
 /* Define the strings used for the special svr4 .type and .size directives.
    These strings generally do not vary from one system running svr4 to
    another, but if a given system (e.g. m88k running svr) needs to use
@@ -119,6 +196,12 @@
 
 #define TYPE_ASM_OP	".type"
 #define SIZE_ASM_OP	".size"
+#define SET_ASM_OP	".set"
+
+/* This is how we tell the assembler that a symbol is weak.  */
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+  do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+       fputc ('\n', FILE); } while (0)
 
 /* The following macro defines the format used to output the second
    operand of the .type assembler directive.  Different svr4 assemblers
@@ -217,34 +300,3 @@
 	putc ('\n', FILE);						\
       }									\
   } while (0)
-
-#define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
-#define LINK_SPEC \
-  "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}"
-
-/* This is defined when gcc is compiled in the BSD-directory-tree, and must
- * make up for the gap to all the stuff done in the GNU-makefiles.
- */
-
-#ifdef FREEBSD_NATIVE
-
-#define INCLUDE_DEFAULTS { \
-	{ "/usr/include", 0 }, \
-	{ "/usr/include/g++", 1 }, \
-	{ 0, 0} \
-	}
-
-#undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/usr/libexec/"
-
-#undef STANDARD_STARTFILE_PREFIX
-#define STANDARD_STARTFILE_PREFIX "/usr/lib"
-
-#if 0 /* This is very wrong!!! */
-#define DEFAULT_TARGET_MACHINE "i386-unknown-freebsd_1.0"
-#define GPLUSPLUS_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
-#define TOOL_INCLUDE_DIR "/usr/local/i386-unknown-freebsd_1.0/include"
-#define GCC_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
-#endif
-
-#endif /* FREEBSD_NATIVE */
diff -ru ../gcc-2.7.2.1.orig/config/i386/i386.c ./config/i386/i386.c
--- ../gcc-2.7.2.1.orig/config/i386/i386.c	Sun Oct 22 07:13:21 1995
+++ ./config/i386/i386.c	Wed Sep 18 02:54:08 1996
@@ -1460,7 +1460,8 @@
   int limit;
   rtx xops[4];
   int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
-				  || current_function_uses_const_pool);
+				  || current_function_uses_const_pool
+				  || profile_flag || profile_block_flag);
 
   xops[0] = stack_pointer_rtx;
   xops[1] = frame_pointer_rtx;
@@ -1521,8 +1522,16 @@
   int nregs = 0;
   int reglimit = (frame_pointer_needed
 		  ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
-  int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
-				  || current_function_uses_const_pool);
+
+#ifdef FUNCTION_PROFILER_EPILOGUE
+  if (profile_flag)
+    return 0;
+#endif
+
+  if (flag_pic && (current_function_uses_pic_offset_table
+		   || current_function_uses_const_pool
+		   || profile_flag || profile_block_flag))
+    return 0;
 
 #ifdef NON_SAVING_SETJMP
   if (NON_SAVING_SETJMP && current_function_calls_setjmp)
@@ -1533,8 +1542,7 @@
     return 0;
 
   for (regno = reglimit - 1; regno >= 0; regno--)
-    if ((regs_ever_live[regno] && ! call_used_regs[regno])
-	|| (regno == PIC_OFFSET_TABLE_REGNUM && pic_reg_used))
+    if (regs_ever_live[regno] && ! call_used_regs[regno])
       nregs++;
 
   return nregs == 0 || ! frame_pointer_needed;
@@ -1556,6 +1564,11 @@
   rtx xops[3];
   int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
 				  || current_function_uses_const_pool);
+
+#ifdef FUNCTION_PROFILER_EPILOGUE
+  if (profile_flag)
+    FUNCTION_PROFILER_EPILOGUE (file);
+#endif
 
   /* Compute the number of registers to pop */
 
diff -ru ../gcc-2.7.2.1.orig/config/i386/i386.h ./config/i386/i386.h
--- ../gcc-2.7.2.1.orig/config/i386/i386.h	Fri Sep 22 18:42:57 1995
+++ ./config/i386/i386.h	Thu Oct  3 13:49:25 1996
@@ -1286,6 +1286,22 @@
   }									\
 while (0)
 
+/* Define this macro if a SYMBOL_REF representing a non-global
+   address must be marked specially.  This is called for
+   compiler-generated local symbols, such as "__EXCEPTION_TABLE__".
+
+   On i386, if using PIC, we use this to set the rtx's
+   SYMBOL_REF_FLAG, so that we may access it directly as
+   an offset from the GOT register. */
+
+#define MARK_LOCAL_ADDRESS(X)						\
+do									\
+  {									\
+    if (flag_pic && GET_CODE (X) == SYMBOL_REF)				\
+      SYMBOL_REF_FLAG (X) = 1;						\
+  }									\
+while (0)
+
 /* Initialize data used by insn expanders.  This is called from
    init_emit, once for each function, before code is generated.
    For 386, clear stack slot assignments remembered from previous
diff -ru ../gcc-2.7.2.1.orig/config/i386/i386.md ./config/i386/i386.md
--- ../gcc-2.7.2.1.orig/config/i386/i386.md	Mon Aug 21 13:27:58 1995
+++ ./config/i386/i386.md	Sat Oct 26 13:00:50 1996
@@ -5312,10 +5312,17 @@
      coprocessor registers as containing a possible return value,
      simply pretend the untyped call returns a complex long double
      value.  */
+#if 1
+  /* this may be part of (set (reg: ..) (call_insn ...)), and we can't
+     directly set a fp register from the call.  so we revert to the
+     old behavior - jlemon@netcom.com (Jonathan Lemon) */
+  emit_call_insn (gen_call (operands[0], const0_rtx, NULL, const0_rtx));
+#else
   emit_call_insn (TARGET_80387
                   ? gen_call_value (gen_rtx (REG, XCmode, FIRST_FLOAT_REG),
 		                  operands[0], const0_rtx)
                   : gen_call (operands[0], const0_rtx));
+#endif
 
   for (i = 0; i < XVECLEN (operands[2], 0); i++)
     {
diff -ru ../gcc-2.7.2.1.orig/config/i386/x-freebsd ./config/i386/x-freebsd
--- ../gcc-2.7.2.1.orig/config/i386/x-freebsd	Mon Oct 31 07:52:41 1994
+++ ./config/i386/x-freebsd	Wed Sep 18 02:54:11 1996
@@ -1,3 +1,4 @@
 # Don't run fixproto
 STMP_FIXPROTO =
-CLIB=-lgnumalloc
+# Use only native include files
+USER_H =
diff -ru ../gcc-2.7.2.1.orig/config/xm-freebsd.h ./config/xm-freebsd.h
--- ../gcc-2.7.2.1.orig/config/xm-freebsd.h	Thu Jun 15 08:53:32 1995
+++ ./config/xm-freebsd.h	Wed Sep 18 02:53:27 1996
@@ -23,6 +23,9 @@
    instead $xm_file should be CPU/xm-freebsd.h, which should include both
    CPU/xm-CPU.h and this file xm-freebsd.h.  */
    
+/* FreeBSD has putenv.  */
+#define HAVE_PUTENV
+
 /* FreeBSD has strerror.  */
 #define HAVE_STRERROR
 
diff -ru ../gcc-2.7.2.1.orig/configure ./configure
--- ../gcc-2.7.2.1.orig/configure	Sun Nov 26 14:39:15 1995
+++ ./configure	Wed Sep 18 02:50:23 1996
@@ -931,6 +931,17 @@
 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
 #		use_collect2=yes
 		;;
+	i[345]86-*-freebsdelf*)
+		cpu_type=i386
+		tm_file=i386/freebsd-elf.h
+		xm_file=i386/xm-freebsd.h
+		# On FreeBSD, the headers are already ok.
+		fixincludes=Makefile.in
+		xmake_file=i386/x-freebsd
+		gas=yes
+		gnu_ld=yes
+		stabs=yes
+		;;
 	i[345]86-*-freebsd*)
 		cpu_type=i386
 		tm_file=i386/freebsd.h
diff -ru ../gcc-2.7.2.1.orig/cp/except.c ./cp/except.c
--- ../gcc-2.7.2.1.orig/cp/except.c	Wed Oct 11 22:29:08 1995
+++ ./cp/except.c	Thu Oct  3 13:49:35 1996
@@ -1614,9 +1614,15 @@
 void
 register_exception_table ()
 {
+  rtx addr = gen_rtx (SYMBOL_REF, Pmode, "__EXCEPTION_TABLE__");
+
+#ifdef MARK_LOCAL_ADDRESS
+  MARK_LOCAL_ADDRESS(addr);
+#endif
+
   emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__register_exceptions"), 0,
 		     VOIDmode, 1,
-		     gen_rtx (SYMBOL_REF, Pmode, "__EXCEPTION_TABLE__"),
+		     addr,
 		     Pmode);
 }
 
diff -ru ../gcc-2.7.2.1.orig/cp/g++.c ./cp/g++.c
--- ../gcc-2.7.2.1.orig/cp/g++.c	Mon Nov 20 17:08:53 1995
+++ ./cp/g++.c	Fri Oct  4 04:51:18 1996
@@ -415,7 +415,7 @@
   programname = p;
 
   if (argc == 1)
-    fatal ("No input files specified.\n");
+    fatal ("No input files specified");
 
 #ifndef __MSDOS__
   /* We do a little magic to find out where the main gcc executable
diff -ru ../gcc-2.7.2.1.orig/cp/gxxint.texi ./cp/gxxint.texi
--- ../gcc-2.7.2.1.orig/cp/gxxint.texi	Wed Oct 11 22:29:39 1995
+++ ./cp/gxxint.texi	Wed Sep 18 02:35:00 1996
@@ -1285,13 +1285,13 @@
         copy value onto heap
         jump throw (Ln, id, address of copy of value on heap)
 
-                                        try {
+                                        try @{
 +Lstart:	the start of the main EH region
 |...						...
 +Lend:		the end of the main EH region
-                                        } catch (T o) {
+                                        @} catch (T o) @{
 						...1
-                                        }
+                                        @}
 Lresume:
         nop	used to make sure there is something before
                 the next region ends, if there is one
@@ -1312,7 +1312,7 @@
 [
  [
         call throw_type_match
-        if (eq) {
+        if (eq) @{
  ] these lines disappear when there is no catch condition
 +Lsregion2:
 |	...1
@@ -1320,7 +1320,7 @@
 |Lhandler:	handler for the region Lsregion2-Leregion2
 |	rethrow (Lresume, same id, same obj);
 +Leregion2
-        }
+        @}
 ] there are zero or more of these sections, depending upon how many
   catch clauses there are
 ----------------------------- expand_end_all_catch --------------------------
@@ -1336,7 +1336,7 @@
 
 start_all_catch emits labels: Lresume, 
 
-#end example
+@end example
 
 The __unwind_function takes a pointer to the throw handler, and is
 expected to pop the stack frame that was built to call it, as well as
@@ -1346,7 +1346,7 @@
 into.  The way I normally start is to compile:
 
         void *g;
-        foo(void* a) { g = a; }
+        foo(void* a) @{ g = a; @}
 
 with -S, and change the thing that alters the PC (return, or ret
 usually) to not alter the PC, making sure to leave all other semantics
@@ -1453,7 +1453,7 @@
 should also be removed, although not doing this is harmless in terms of
 semantics.
 
-#end itemize
+@end itemize
 
 The above is not meant to be exhaustive, but does include all things I
 have thought of so far.  I am sure other limitations exist.
@@ -1515,7 +1515,7 @@
 
 The eh archive (~mrs/eh) might be good reading for understanding the Ada
 perspective, and some of kenners mindset, and a detailed explanation
-(Message-Id: <9308301130.AA10543@vlsi1.ultra.nyu.edu>) of the concepts
+(Message-Id: <9308301130.AA10543@@vlsi1.ultra.nyu.edu>) of the concepts
 involved.
 
 Here is a guide to existing backend type code.  It is all in
diff -ru ../gcc-2.7.2.1.orig/cp/reno.texi ./cp/reno.texi
--- ../gcc-2.7.2.1.orig/cp/reno.texi	Thu Apr 14 22:00:39 1994
+++ ./cp/reno.texi	Wed May 28 03:48:01 1997
@@ -4,7 +4,7 @@
 @ifinfo
 @format
 START-INFO-DIR-ENTRY
-* Reno 1: (reno-1).             The GNU C++ Renovation Project, Phase 1.
+* Reno 1: (reno).		The GNU C++ Renovation Project, Phase 1.
 END-INFO-DIR-ENTRY
 @end format
 @end ifinfo
diff -ru ../gcc-2.7.2.1.orig/final.c ./final.c
--- ../gcc-2.7.2.1.orig/final.c	Sun Nov 26 13:50:00 1995
+++ ./final.c	Mon Jan 13 07:15:29 1997
@@ -345,6 +345,8 @@
       /* zero word */
       assemble_integer (const0_rtx, UNITS_PER_WORD, 1);
 
+      fprintf(asm_out_file,".stabs \"bbset\", 25, 0, 0, LPBX0\n");
+
       /* address of filename */
       ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 1);
       assemble_integer (gen_rtx (SYMBOL_REF, Pmode, name), UNITS_PER_WORD, 1);
@@ -914,6 +916,9 @@
     leaf_renumber_regs (first);
 #endif
 
+  if (profile_block_flag)
+    add_bb (file);
+
   /* The Sun386i and perhaps other machines don't work right
      if the profiling code comes after the prologue.  */
 #ifdef PROFILE_BEFORE_PROLOGUE
@@ -971,14 +976,18 @@
 profile_function (file)
      FILE *file;
 {
+#ifndef NO_PROFILE_DATA
   int align = MIN (BIGGEST_ALIGNMENT, POINTER_SIZE);
+#endif /* not NO_PROFILE_DATA */
   int sval = current_function_returns_struct;
   int cxt = current_function_needs_context;
 
+#ifndef NO_PROFILE_DATA
   data_section ();
   ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
   ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no);
   assemble_integer (const0_rtx, POINTER_SIZE / BITS_PER_UNIT, 1);
+#endif /* not NO_PROFILE_DATA */
 
   text_section ();
 
@@ -1065,6 +1074,9 @@
      code to restore the stack frame and return to the caller.  */
   FUNCTION_EPILOGUE (file, get_frame_size ());
 #endif
+
+  if (profile_block_flag)
+    add_bb (file);
 
 #ifdef SDB_DEBUGGING_INFO
   if (write_symbols == SDB_DEBUG)
diff -ru ../gcc-2.7.2.1.orig/gcc.1 ./gcc.1
--- ../gcc-2.7.2.1.orig/gcc.1	Sun Nov 26 14:11:33 1995
+++ ./gcc.1	Sun Jun 29 07:43:31 1997
@@ -438,7 +438,17 @@
 \-m486
 \-mno\-486
 \-msoft\-float
+\-mrtd
+\-mregparm
+\-msvr3\-shlib
+\-mno\-ieee\-fp
 \-mno\-fp\-ret\-in\-387
+\-mfancy\-math\-387
+\-mno\-wide\-multiply
+\-mdebug\-addr
+\-mno\-move
+\-mprofiler\-epilogue
+\-reg\-alloc=LIST
 .Sp
 .I HPPA Options
 .br
@@ -1179,13 +1189,17 @@
 .B \-M\c
 \&\|' but the output mentions only the user header files
 included with `\|\c
-.B #include "\c
+.B
+#include "\c
 .I file\c
+.B
 \&"\c
 \&\|'.  System header files
 included with `\|\c
-.B #include <\c
+.B
+#include <\c
 .I file\c
+.B
 \&>\c
 \&\|' are omitted.
 .TP
@@ -1462,8 +1476,10 @@
 \&"\c
 \&\|';
 they are not searched for `\|\c
-.B #include <\c
+.B
+#include <\c
 .I file\c
+.B
 \&>\c
 \&\|'.
 .Sp
@@ -1961,7 +1977,7 @@
 .B \-Wnested-externs
 Warn if an \c
 .B extern\c
-\& declaration is encountered within an function.
+\& declaration is encountered within a function.
 .TP
 .B \-Wenum\-clash
 Warn about conversion between different enumeration types (C++ only).
@@ -3490,7 +3506,7 @@
 value.
 .TP
 .B \-nocpp
-Tell the MIPS assembler to not run it's preprocessor over user
+Tell the MIPS assembler to not run its preprocessor over user
 assembler files (with a `\|\c
 .B .s\c
 \&\|' suffix) when assembling them.
@@ -3498,6 +3514,7 @@
 These `\|\c
 .B \-m\c
 \&\|' options are defined for the Intel 80386 family of computers:
+.TP
 .B \-m486
 .TP
 .B \-mno\-486
@@ -3534,6 +3551,11 @@
 .B \-mno-fp-ret-in-387\c
 \&\|' causes such values to be returned
 in ordinary CPU registers instead.
+.TP
+.B \-mprofiler-epilogue
+.TP
+.B \-mno-profiler-epilogue
+Generate extra code to write profile information for function exits.
 .PP
 These `\|\c
 .B \-m\c
@@ -4069,7 +4091,7 @@
 .B /tmp\c
 \&).
 .SH "SEE ALSO"
-cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
+cpp(1), as(1), ld(1), gdb(1).
 .br
 .RB "`\|" gcc "\|', `\|" cpp \|',
 .RB "`\|" as "\|', `\|" ld \|',
diff -ru ../gcc-2.7.2.1.orig/gcc.c ./gcc.c
--- ../gcc-2.7.2.1.orig/gcc.c	Tue Sep 12 17:15:11 1995
+++ ./gcc.c	Fri Apr 25 02:42:57 1997
@@ -32,6 +32,7 @@
 compilation is specified by a string called a "spec".  */
 
 #include <sys/types.h>
+#include <sys/wait.h>
 #include <ctype.h>
 #include <signal.h>
 #include <sys/stat.h>
@@ -53,6 +54,9 @@
 #include <varargs.h>
 #endif
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
 
 /* Include multi-lib information.  */
 #include "multilib.h"
@@ -1620,7 +1624,6 @@
   char **envp;
   int num_envs = 0;
   int name_len = 1;
-  int str_len = strlen (str);
   char *p = str;
   int ch;
 
@@ -2095,7 +2098,7 @@
       /* Exec the program.  */
       (*func) (program, argv);
       perror_exec (program);
-      exit (-1);
+      _exit (1);
       /* NOTREACHED */
       return 0;
 
@@ -2703,6 +2706,11 @@
      (such as cpp) rather than those of the host system.  */
   /* Use 2 as fourth arg meaning try just the machine as a suffix,
      as well as trying the machine and the version.  */
+#ifdef FREEBSD_NATIVE
+  add_prefix (&exec_prefixes, "/usr/libexec/", 0, 0, NULL_PTR);
+  add_prefix (&exec_prefixes, "/usr/bin/", 0, 0, NULL_PTR);
+  add_prefix (&startfile_prefixes, "/usr/libdata/gcc/", 0, 0, NULL_PTR);
+#else /* not FREEBSD_NATIVE */
 #ifndef OS2
   add_prefix (&exec_prefixes, standard_exec_prefix, 0, 2, NULL_PTR);
   add_prefix (&exec_prefixes, standard_exec_prefix_1, 0, 2, NULL_PTR);
@@ -2710,6 +2718,7 @@
 
   add_prefix (&startfile_prefixes, standard_exec_prefix, 0, 1, NULL_PTR);
   add_prefix (&startfile_prefixes, standard_exec_prefix_1, 0, 1, NULL_PTR);
+#endif /* FREEBSD_NATIVE */
 
   tooldir_prefix = concat3 (tooldir_base_prefix, spec_machine, 
                             dir_separator_str);
@@ -2744,12 +2753,14 @@
                                 dir_separator_str, tooldir_prefix);
     }
 
+#ifndef FREEBSD_NATIVE
   add_prefix (&exec_prefixes, 
               concat3 (tooldir_prefix, "bin", dir_separator_str),
 	      0, 0, NULL_PTR);
   add_prefix (&startfile_prefixes,
 	      concat3 (tooldir_prefix, "lib", dir_separator_str),
 	      0, 0, NULL_PTR);
+#endif /* FREEBSD_NATIVE */
 
   /* More prefixes are enabled in main, after we read the specs file
      and determine whether this is cross-compilation or not.  */
@@ -3770,7 +3781,7 @@
 	    {
 	      int c1 = *p++;  /* Select first or second version number.  */
 	      char *v = compiler_version;
-	      char *q, *copy;
+	      char *q;
 	      /* If desired, advance to second version number.  */
 	      if (c1 == '2')
 		{
@@ -4266,9 +4277,11 @@
 
   /* Read specs from a file if there is one.  */
 
+#ifndef FREEBSD_NATIVE
   machine_suffix = concat4 (spec_machine, dir_separator_str,
                             spec_version, dir_separator_str);
   just_machine_suffix = concat (spec_machine, dir_separator_str);
+#endif
 
   specs_file = find_a_file (&startfile_prefixes, "specs", R_OK);
   /* Read the specs file unless it is a default one.  */
@@ -4316,6 +4329,7 @@
 		      0, 0, NULL_PTR);
 	}		       
 
+#ifndef FREEBSD_NATIVE
       add_prefix (&startfile_prefixes, standard_startfile_prefix_1, 0, 0,
 		  NULL_PTR);
       add_prefix (&startfile_prefixes, standard_startfile_prefix_2, 0, 0,
@@ -4323,6 +4337,8 @@
 #if 0 /* Can cause surprises, and one can use -B./ instead.  */
       add_prefix (&startfile_prefixes, "./", 0, 1, NULL_PTR);
 #endif
+#endif /* FREEBSD_NATIVE */
+
     }
   else
     {
@@ -4413,7 +4429,7 @@
     }
 
   if (n_infiles == 0)
-    fatal ("No input files");
+    fatal ("No input files specified");
 
   /* Make a place to record the compiler output file names
      that correspond to the input files.  */
diff -ru ../gcc-2.7.2.1.orig/ginclude/stdarg.h ./ginclude/stdarg.h
--- ../gcc-2.7.2.1.orig/ginclude/stdarg.h	Tue Sep 12 12:50:36 1995
+++ ./ginclude/stdarg.h	Wed Sep 18 02:31:39 1996
@@ -43,6 +43,15 @@
 #else
 
 /* Define __gnuc_va_list.  */
+#if defined (__FreeBSD__)
+/* This is the correct way to handle all BSD NET2 and BSD 4.4 systems.  */
+#include <machine/ansi.h>
+#ifdef _BSD_VA_LIST_
+typedef _BSD_VA_LIST_ __gnuc_va_list;
+#else
+typedef _VA_LIST_ __gnuc_va_list;
+#endif
+#else
 
 #ifndef __GNUC_VA_LIST
 #define __GNUC_VA_LIST
@@ -52,6 +61,7 @@
 typedef void *__gnuc_va_list;
 #endif
 #endif
+#endif
 
 /* Define the standard macros for the user,
    if this invocation was from the user program.  */
@@ -116,8 +126,13 @@
 #undef _VA_LIST
 #endif
 
+#if 0
+/* BSD 4.4 actually spells the name _BSD_VA_LIST_ and requires it to be
+ * defined and usable in place of va_list when the latter name is not
+ * allowed (e.g., in stdio.h - see above).  */
 #ifdef _BSD_VA_LIST
 #undef _BSD_VA_LIST
+#endif
 #endif
 
 #ifdef __svr4__
diff -ru ../gcc-2.7.2.1.orig/ginclude/stddef.h ./ginclude/stddef.h
--- ../gcc-2.7.2.1.orig/ginclude/stddef.h	Sat Aug 19 16:39:22 1995
+++ ./ginclude/stddef.h	Wed Sep 18 02:31:40 1996
@@ -257,7 +257,7 @@
 
 /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
     are already defined.  */
-#ifdef _ANSI_H_
+#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
 /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
     are probably typos and should be removed before 2.8 is released.  */
 #ifdef _GCC_PTRDIFF_T_
@@ -285,7 +285,7 @@
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* _ANSI_H_ */
+#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
 
 #endif /* __sys_stdtypes_h */
 
diff -ru ../gcc-2.7.2.1.orig/ginclude/varargs.h ./ginclude/varargs.h
--- ../gcc-2.7.2.1.orig/ginclude/varargs.h	Sun Aug 13 18:18:55 1995
+++ ./ginclude/varargs.h	Wed Sep 18 02:31:42 1996
@@ -78,12 +78,22 @@
 
 #ifndef __GNUC_VA_LIST
 #define __GNUC_VA_LIST
+#if defined (__FreeBSD__)
+/* This is the correct way to handle all BSD NET2 and BSD 4.4 systems.  */
+#include <machine/ansi.h>
+#ifdef _BSD_VA_LIST_
+typedef _BSD_VA_LIST_ __gnuc_va_list;
+#else
+typedef _VA_LIST_ __gnuc_va_list;
+#endif
+#else
 #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
 typedef char *__gnuc_va_list;
 #else
 typedef void *__gnuc_va_list;
 #endif
 #endif
+#endif
 
 #define va_start(AP)  AP=(char *) &__builtin_va_alist
 
@@ -185,6 +195,11 @@
 
 /* The next BSD release (if there is one) wants this symbol to be
    undefined instead of _VA_LIST_.  */
+#if 0
+/* BSD 4.4 actually spells the name _BSD_VA_LIST_ and requires it to be
+ * defined and usable in place of va_list when the latter name is not
+ * allowed (e.g., in stdio.h - see ginclude/stdarg.h).  */
 #ifdef _BSD_VA_LIST
 #undef _BSD_VA_LIST
+#endif
 #endif
diff -ru ../gcc-2.7.2.1.orig/invoke.texi ./invoke.texi
--- ../gcc-2.7.2.1.orig/invoke.texi	Tue Oct  3 11:40:43 1995
+++ ./invoke.texi	Wed Sep 18 02:56:52 1996
@@ -281,9 +281,10 @@
 -mstats  -EL  -EB  -G @var{num}  -nocpp
 
 @emph{i386 Options}
--m486  -m386 -mieee-fp  -mno-fancy-math-387
--mno-fp-ret-in-387  -msoft-float  -msvr3-shlib  
--mno-wide-multiply -mrtd -malign-double
+-m386  -m486  -mno-fancy-math-387
+-mno-fp-ret-in-387  -mno-ieee-fp  -mno-wide-multiply
+-mprofiler-epilogue  -mrtd  -msoft-float
+-msvr3-shlib  -malign-double
 -mreg-alloc=@var{list} -mregparm=@var{num}
 -malign-jumps=@var{num} -malign-loops=@var{num}
 -malign-functions=@var{num}
@@ -3669,8 +3670,8 @@
 Control whether or not code is optimized for a 486 instead of an
 386.  Code generated for an 486 will run on a 386 and vice versa.
 
-@item -mieee-fp
-@itemx -mno-ieee-fp
+@item -mno-ieee-fp
+@itemx -mieee-fp
 Control whether or not the compiler uses IEEE floating point
 comparisons.  These handle correctly the case where the result of a
 comparison is unordered.
@@ -3728,6 +3729,12 @@
 Control whether GNU CC uses the @code{mul} and @code{imul} that produce
 64 bit results in @code{eax:edx} from 32 bit operands to do @code{long
 long} multiplies and 32-bit division by constants.
+
+@item -mprofiler-epilogue
+@itemx -mno-profiler-epilogue
+Generate extra code to write profile information for function exits.
+This option has no effect except in combination with @samp{-g} or
+@samp{-pg}.
 
 @item -mrtd
 Use a different function-calling convention, in which functions that
