diff -ruN gcc-2.7.2/README.MiNT gcc-2.7.2-mint/README.MiNT
--- gcc-2.7.2/README.MiNT	Thu Jan  1 01:00:00 1970
+++ gcc-2.7.2-mint/README.MiNT	Sat Aug 10 12:40:10 1996
@@ -0,0 +1,36 @@
+GCC 2.7.2 for m68k-mint
+
+I have applied Andreas Schwab's patches for GCC 2.6.1 to GCC 2.7.2 and it
+seems to work fine. Concatenated is the original README.MINT.
+---
+Christer Gustavsson
+d2cg@dtek.chalmers.se
+---
+
+GCC 2.6.1 for m68k-mint
+
+These are patches to implement the targets m68k-mint and m68000-mint
+for GCC 2.6.1; for m68k-mint the default is to generate code for
+m68020/m68040 with m68881/2, whereas m68000-mint is for a plain
+m68000.  To build the compiler apply the patches in Diffs and copy the
+files in config/m68k into the source tree.  Run configure specifying
+the appropriate target m68k-mint or m68000-mint, then run make, and
+take a cup of tea (or coffee if you prefer) :-).  For more information
+see the file INSTALL in the gcc sources.
+
+The resulting compiler will be a bit different to previous version
+available for the Atari:
+
+- it will only run properly under MiNT with MinixFS
+- it does not accept a -mint option, but still -mbaserel and -mpcrel.
+- it passes -lc to the linker as the name for the C library.
+- the name of the library is not changed according to the -m options,
+  but rather the linker is told to search it in appropriate subdirs of
+  the main library dir. For example, with -mshort this will be
+  $prefix/lib/mshort, where $prefix is the installation prefix.  This
+  is a new feature of version 2.6.
+
+Enjoy,
+--
+Andreas Schwab
+schwab@issan.informatik.uni-dortmund.de
diff -ruN gcc-2.7.2/calls.c gcc-2.7.2-mint/calls.c
--- gcc-2.7.2/calls.c	Fri Oct 27 04:53:42 1995
+++ gcc-2.7.2-mint/calls.c	Fri Jul 26 16:22:40 1996
@@ -2284,6 +2284,12 @@
 
   argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
 
+/* how would you do this RIGHT ?? fake a DECL node? dunno... */
+#ifdef ENCODE_SECTION_INFO
+  /* mark it as a function (to be in the text section that is) */
+  SYMBOL_REF_FLAG (fun) = 1;
+#endif
+
   INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
 
   args_size.constant = 0;
@@ -2591,6 +2597,11 @@
      library functions shouldn't have many args.  */
 
   argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
+
+#ifdef ENCODE_SECTION_INFO
+  /* mark it as a function (to be in the text section that is) */
+  SYMBOL_REF_FLAG (fun) = 1;
+#endif
 
   INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
 
diff -ruN gcc-2.7.2/config/m68k/m68k.c gcc-2.7.2-mint/config/m68k/m68k.c
--- gcc-2.7.2/config/m68k/m68k.c	Thu Sep 28 20:00:16 1995
+++ gcc-2.7.2-mint/config/m68k/m68k.c	Fri Jul 26 16:30:22 1996
@@ -234,7 +234,7 @@
       asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
 #endif
     }
-  if (flag_pic && current_function_uses_pic_offset_table)
+  if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
     {
 #ifdef MOTOROLA
       asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
@@ -999,10 +999,18 @@
   /* First handle a simple SYMBOL_REF or LABEL_REF */
   if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
     {
+#ifdef LEGITIMATE_BASEREL_OPERAND_P
+      if (LEGITIMATE_BASEREL_OPERAND_P (orig))
+	return orig;
+#endif
+
       if (reg == 0)
 	abort ();
 
-      pic_ref = gen_rtx (MEM, Pmode,
+      if (flag_pic == 3)
+        pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
+      else
+	pic_ref = gen_rtx (MEM, Pmode,
 			 gen_rtx (PLUS, Pmode,
 				  pic_offset_table_rtx, orig));
       current_function_uses_pic_offset_table = 1;
@@ -2170,6 +2178,9 @@
       output_address (XEXP (op, 0));
       if (letter == 'd' && ! TARGET_68020
 	  && CONSTANT_ADDRESS_P (XEXP (op, 0))
+	  && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+	       && SYMBOL_REF_FLAG (XEXP (op, 0))
+	       && !SYMBOL_REF_USED (XEXP (op, 0)))
 	  && !(GET_CODE (XEXP (op, 0)) == CONST_INT
 	       && INTVAL (XEXP (op, 0)) < 0x8000
 	       && INTVAL (XEXP (op, 0)) >= -0x8000))
@@ -2455,6 +2466,8 @@
 	          fprintf (file, ":w");
 	        if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
 	          fprintf (file, ":l");
+	        if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
+	          fprintf (file, ":w");
 	      }
 	    if (addr != 0 && ireg != 0)
 	      {
@@ -2519,6 +2532,18 @@
 	    fprintf (file, "%d:w", INTVAL (addr));
 #endif
 	  }
+	else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
+		 && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
+	  {
+#ifdef MOTOROLA
+	    output_addr_const (file, addr);
+	    fputs ("(pc)", file);
+#else
+	    fputs ("pc@(", file);
+	    output_addr_const (file, addr);
+	    putc (')', file);
+#endif
+	  }
 	else
 	  {
 	    output_addr_const (file, addr);
@@ -2585,6 +2610,22 @@
 
   return 0;
 }
+
+#ifdef ENCODE_SECTION_INFO
+/* Does operand (which is a symbolic_operand) live in text space? If
+   so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
+
+int
+read_only_operand (operand)
+     rtx operand;
+{
+  if (GET_CODE (operand) == CONST)
+    operand = XEXP (XEXP (operand, 0), 0);
+  if (GET_CODE (operand) == SYMBOL_REF)
+    return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
+  return 1;
+}
+#endif
 
 /* Accept integer operands in the range 0..0xffffffff.  We have to check the
    range carefully since this predicate is used in DImode contexts.  Also, we
diff -ruN gcc-2.7.2/config/m68k/m68k.h gcc-2.7.2-mint/config/m68k/m68k.h
--- gcc-2.7.2/config/m68k/m68k.h	Sat Oct 21 01:10:26 1995
+++ gcc-2.7.2-mint/config/m68k/m68k.h	Fri Jul 26 16:37:52 1996
@@ -93,6 +93,12 @@
 /* Use the 68040-only fp instructions (-m68040).  */
 #define TARGET_68040_ONLY (target_flags & 01000)
 
+/* Use PC-relative addressing for refs to read-only data */
+#define TARGET_PC_REL (target_flags & 02000)
+
+/* Use base-relative addressing for refs to data&bss segments */
+#define TARGET_BASE_REL (target_flags & 04000)
+
 /* Macro to define tables used to set the flags.
    This is a list in braces of pairs in braces,
    each pair being { "NAME", VALUE }
@@ -1152,6 +1158,8 @@
        && GET_CODE (XEXP (X, 1)) == CONST_INT				\
        && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000)		\
    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
+       && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1)))		\
+   || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
        && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)		\
    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
        && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))		\
@@ -1218,7 +1226,8 @@
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\
 { GO_IF_NONINDEXED_ADDRESS (X, ADDR);					\
   GO_IF_INDEXED_ADDRESS (X, ADDR);					\
-  if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS	\
+  if (flag_pic && flag_pic != 3						\
+      && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS		\
       && LEGITIMATE_INDEX_P (XEXP (X, 0))				\
       && GET_CODE (XEXP (X, 1)) == LABEL_REF)				\
     goto ADDR; }
diff -ruN gcc-2.7.2/config/m68k/m68k.md gcc-2.7.2-mint/config/m68k/m68k.md
--- gcc-2.7.2/config/m68k/m68k.md	Tue Nov  7 16:57:30 1995
+++ gcc-2.7.2-mint/config/m68k/m68k.md	Sat Jul 27 22:09:20 1996
@@ -441,6 +441,11 @@
 {
   if (flag_pic && symbolic_operand (operands[1], SImode)) 
     {
+/*
+#ifdef LEGITIMATE_BASEREL_OPERAND_P
+   if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
+#endif
+*/
       /* The source is an address which requires PIC relocation.  
          Call legitimize_pic_address with the source, mode, and a relocation
          register (a new pseudo, or the final destination if reload_in_progress
@@ -786,6 +791,11 @@
 {
   if (flag_pic && symbolic_operand (operands[1], SImode)) 
     {
+/*
+#ifdef LEGITIMATE_BASEREL_OPERAND_P
+   if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
+#endif
+*/
       /* The source is an address which requires PIC relocation.  
          Call legitimize_pic_address with the source, mode, and a relocation
          register (a new pseudo, or the final destination if reload_in_progress
@@ -1071,6 +1081,17 @@
 	  return \"st %0\";
 	}
     }
+  if (GET_CODE (operands[1]) == CONST_INT
+      && DATA_REG_P (operands[0])
+      && INTVAL (operands[1]) < 128
+      && INTVAL (operands[1]) >= -128)
+    {
+#if defined(MOTOROLA) && !defined(CRDS)
+      return \"moveq%.l %1,%0\";
+#else
+      return \"moveq %1,%0\";
+#endif
+    }
   if (GET_CODE (operands[1]) != CONST_INT && CONSTANT_P (operands[1]))
     return \"move%.l %1,%0\";
   if (ADDRESS_REG_P (operands[0]) || ADDRESS_REG_P (operands[1]))
@@ -4190,7 +4211,7 @@
 (define_insn "ashlsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(ashift:SI (match_operand:SI 1 "register_operand" "0")
-		   (match_operand:SI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "*
 {
@@ -4202,14 +4223,14 @@
 (define_insn "ashlhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(ashift:HI (match_operand:HI 1 "register_operand" "0")
-		   (match_operand:HI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asl%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(ashift:HI (match_dup 0)
-		   (match_operand:HI 1 "general_operand" "dI")))]
+		   (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "asl%.w %1,%0")
 
@@ -4350,21 +4371,21 @@
 (define_insn "ashrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(ashiftrt:SI (match_operand:SI 1 "register_operand" "0")
-		     (match_operand:SI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asr%.l %2,%0")
 
 (define_insn "ashrhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(ashiftrt:HI (match_operand:HI 1 "register_operand" "0")
-		     (match_operand:HI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asr%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(ashiftrt:HI (match_dup 0)
-		     (match_operand:HI 1 "general_operand" "dI")))]
+		     (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "asr%.w %1,%0")
 
@@ -4535,21 +4556,21 @@
 (define_insn "lshrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(lshiftrt:SI (match_operand:SI 1 "register_operand" "0")
-		     (match_operand:SI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "lsr%.l %2,%0")
 
 (define_insn "lshrhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(lshiftrt:HI (match_operand:HI 1 "register_operand" "0")
-		     (match_operand:HI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "lsr%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(lshiftrt:HI (match_dup 0)
-		     (match_operand:HI 1 "general_operand" "dI")))]
+		     (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "lsr%.w %1,%0")
 
@@ -4572,14 +4593,14 @@
 (define_insn "rotlsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(rotate:SI (match_operand:SI 1 "register_operand" "0")
-		   (match_operand:SI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "rol%.l %2,%0")
 
 (define_insn "rotlhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(rotate:HI (match_operand:HI 1 "register_operand" "0")
-		   (match_operand:HI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "rol%.w %2,%0")
 
@@ -4587,7 +4608,7 @@
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(rotate:HI (match_dup 0)
-		   (match_operand:HI 1 "general_operand" "dI")))]
+		   (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "rol%.w %1,%0")
 
@@ -4608,21 +4629,21 @@
 (define_insn "rotrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(rotatert:SI (match_operand:SI 1 "register_operand" "0")
-		     (match_operand:SI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "ror%.l %2,%0")
 
 (define_insn "rotrhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(rotatert:HI (match_operand:HI 1 "register_operand" "0")
-		     (match_operand:HI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "ror%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(rotatert:HI (match_dup 0)
-		     (match_operand:HI 1 "general_operand" "dI")))]
+		     (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "ror%.w %1,%0")
 
@@ -5874,7 +5895,7 @@
   ""
   "
 {
-  if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
+  if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
     SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
 }")
 
@@ -5884,7 +5905,7 @@
 	 (match_operand:SI 1 "general_operand" "g"))]
   ;; Operand 1 not really used on the m68000.
 
-  "! flag_pic"
+  "! flag_pic || flag_pic == 3"
   "*
 #if defined (MOTOROLA) && !defined (USE_GAS)
 #ifdef MOTOROLA_BSR
@@ -5904,7 +5925,7 @@
 	 (match_operand:SI 1 "general_operand" "g"))]
   ;; Operand 1 not really used on the m68000.
 
-  "flag_pic"
+  "flag_pic && flag_pic < 3"
   "*
   if (GET_CODE (operands[0]) == MEM 
       && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
@@ -5937,7 +5958,7 @@
   ""
   "
 {
-  if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
+  if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
     SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
 }")
 
@@ -5947,7 +5968,7 @@
 	(call (match_operand:QI 1 "memory_operand" "o")
 	      (match_operand:SI 2 "general_operand" "g")))]
   ;; Operand 2 not really used on the m68000.
-  "! flag_pic"
+  "! flag_pic || flag_pic == 3"
   "*
 #if defined (MOTOROLA) && !defined (USE_GAS)
 #ifdef MOTOROLA_BSR
@@ -5967,7 +5988,7 @@
 	(call (match_operand:QI 1 "memory_operand" "o")
 	      (match_operand:SI 2 "general_operand" "g")))]
   ;; Operand 2 not really used on the m68000.
-  "flag_pic"
+  "flag_pic && flag_pic < 3"
   "*
   if (GET_CODE (operands[1]) == MEM 
       && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
@@ -6293,6 +6314,52 @@
 	  (if_then_else
 	    (ge (plus:SI (match_operand:SI 0 "register_operand" "+d")
 		         (const_int -1))
+	        (const_int 0))
+	    (label_ref (match_operand 1 "" ""))
+	    (pc)))
+     (set (match_dup 0)
+	  (plus:SI (match_dup 0)
+		   (const_int -1)))])]
+  "DATA_REG_P (operands[0])"
+  "*
+{
+  CC_STATUS_INIT;
+  output_dbcc_and_branch (operands);
+  return \"\";
+}")
+
+(define_peephole
+  [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
+                             [(cc0) (const_int 0)])
+                           (label_ref (match_operand 2 "" ""))
+                           (pc)))
+   (parallel
+    [(set (pc)
+	  (if_then_else
+	    (ne (match_operand:HI 0 "register_operand" "+d")
+	        (const_int 0))
+	    (label_ref (match_operand 1 "" ""))
+	    (pc)))
+     (set (match_dup 0)
+	  (plus:HI (match_dup 0)
+		   (const_int -1)))])]
+  "DATA_REG_P (operands[0])"
+  "*
+{
+  CC_STATUS_INIT;
+  output_dbcc_and_branch (operands);
+  return \"\";
+}")
+
+(define_peephole
+  [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
+                             [(cc0) (const_int 0)])
+                           (label_ref (match_operand 2 "" ""))
+                           (pc)))
+   (parallel
+    [(set (pc)
+	  (if_then_else
+	    (ne (match_operand:SI 0 "register_operand" "+d")
 	        (const_int 0))
 	    (label_ref (match_operand 1 "" ""))
 	    (pc)))
diff -ruN gcc-2.7.2/config/m68k/mint.h gcc-2.7.2-mint/config/m68k/mint.h
--- gcc-2.7.2/config/m68k/mint.h	Thu Jan  1 01:00:00 1970
+++ gcc-2.7.2-mint/config/m68k/mint.h	Fri Nov  4 23:00:00 1994
@@ -0,0 +1,415 @@
+/* Definitions of target machine for GNU compiler.  atariST/TT version.
+   Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+#include "m68k/m68k.h"
+
+/* See m68k.h.  7 means 68020 with 68881, or 68030.  */
+
+#ifndef TARGET_DEFAULT
+#ifdef TARGET_CPU_DEFAULT
+#define TARGET_DEFAULT TARGET_CPU_DEFAULT
+#else
+#define TARGET_DEFAULT 7
+#endif
+#endif
+
+/* Pass the architecture flags to the assembler. */
+#define COMMON_ASM_SPEC \
+  "%{m68000} %{mc68000} %{m68020} %{mc68020} %{m68020-40:-m68020} %{m68030} " \
+  "%{m68040} %{m68881} %{msoft-float:-mno-68881} %{m68851} %{mno-68851} " \
+  "%{m68302} %{mno-68302} %{m68332} %{mno-68332}"
+
+#if (TARGET_DEFAULT & 01000)
+/* note atleast gas-1.38 Patchlevel 2 required for mc68040 specific
+   support in the assembler.  */
+#define ASM_SPEC "%{!m680*:%{!mc680*:-m68040}} " COMMON_ASM_SPEC
+#else
+/* falcon/TT */
+#if (TARGET_DEFAULT & 5) /* note this is true for TARGET_DEFAULT == 0407 too */
+/* for the TT etc (020/030) also appropriate for m68040 (falcon) ie:
+   -m68020-40 (and not -m68040). Note that the assembler does not need
+   any special indication of the 040 when -m68020-40, only needs
+   -mc68020. the only time the assembler needs -mc68040 is when
+   -m68040 */
+#define ASM_SPEC COMMON_ASM_SPEC
+#else
+/* for a regular 68k ST */
+#if (TARGET_DEFAULT & 2)
+#define ASM_SPEC \
+ "%{!m680*:%{!mc680*:-m68000 %{!msoft-float:-m68881}}} "\
+ COMMON_ASM_SPEC
+#else
+#define ASM_SPEC "%{!m680*:%{!mc680*:-m68000}} " COMMON_ASM_SPEC
+#endif
+#endif /* TT /falcon */
+#endif /* m68040-only */
+
+/* Register to use for base-relative addressing. The BASE_ADDR_* macros
+   are for using GNU cpp's stringification feature. */
+
+#define BASE_ADDR_REG	4		/* a4 */
+#undef PIC_OFFSET_TABLE_REGNUM
+#define PIC_OFFSET_TABLE_REGNUM	(BASE_ADDR_REG+8)	/* GCC register num */
+#define BASE_ADDR_STRING(X)	"a" #X
+#define BASE_ADDR_NAME(X)	BASE_ADDR_STRING(X)
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES			\
+    { "pcrel", 02000},				\
+    { "nopcrel", -02000},			\
+    { "baserel", 04000},			\
+    { "nobaserel", -04000},
+
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS \
+  if (TARGET_BASE_REL) flag_pic = 3;
+
+#define COMMON_CPP_SPEC \
+"%{mshort:-D__MSHORT__} "\
+"%{mbaserel:-D__MBASE__=" BASE_ADDR_NAME (BASE_ADDR_REG)\
+  " -D__MBASESTR__=\"" BASE_ADDR_NAME (BASE_ADDR_REG) "\"}"
+
+#if (TARGET_DEFAULT & 5)
+#if (TARGET_DEFAULT & 2)
+#define CPP_SPEC \
+ "%{m68881:%{m68000:-D__M68881__} %{mc68000:-D__M68881__}} "\
+ "%{!m68000:%{!mc68000:"\
+   "%{!msoft-float:-D__M68881__} "\
+   "-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}}} "\
+ COMMON_CPP_SPEC
+#define CC1_SPEC \
+ "%{!m68881:%{m68000:-msoft-float} %{mc68000:-msoft-float}}"
+#else
+#define CPP_SPEC \
+ "%{m68881:-D__M68881__} "\
+ "%{!m68000:%{!mc68000:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}}} "\
+ COMMON_CPP_SPEC
+#endif
+#else
+#if (TARGET_DEFAULT & 2)
+#define CPP_SPEC \
+ "%{!msoft-float:-D__M68881__} "\
+ "%{m68020*:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ "%{mc68020:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ "%{m68030:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ "%{m68040:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ COMMON_CPP_SPEC
+#else
+#define CPP_SPEC \
+ "%{m68881:-D__M68881__} "\
+ "%{m68020*:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ "%{mc68020:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ "%{m68030:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ "%{m68040:-D__M68020__ -D__mc68020__ %{!ansi:-Dmc68020}} "\
+ COMMON_CPP_SPEC
+#endif
+#endif
+
+/* Names to predefine in the preprocessor for this target machine.  */
+
+#define CPP_PREDEFINES "-Dmc68000 -Datarist -Dgem -Asystem(tos) -Asystem(gem) -Acpu(m68k) -Amachine(m68k)"
+
+/* specs for start file and link specs */
+#define STARTFILE_SPEC "%{pg:g}%{!pg:%{p:m}}crt0.o%s"
+
+/* NOTE: for ataris we dont need to do anything special for -a or
+   -tcov as bb_* routines will automatically be pulled in from the
+   libraries as required when they are referenced by the generated
+   code.  */
+
+#define LIB_SPEC "-lc"
+
+/* Tell linker to make sharable text executable */
+
+#define LINK_SPEC "%{mbaserel:-n}"
+
+#define PTRDIFF_TYPE "long int"
+#define SIZE_TYPE "long unsigned int"
+
+/* We must override m68k.h.  */
+#undef WCHAR_TYPE
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE "short unsigned int"
+#define WCHAR_TYPE_SIZE 16
+#define WCHAR_UNSIGNED 1
+
+#if 0
+/* Don't try using XFmode.  */
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
+#endif
+
+/* Every structure or union's size must be a multiple of 2 bytes.  */
+
+#define STRUCTURE_SIZE_BOUNDARY 16
+
+#define DBX_DEBUGGING_INFO
+
+/* Allow folding division by zero.  */
+#define REAL_INFINITY
+
+/* Generate calls to memcpy, memcmp and memset.  */
+#define TARGET_MEM_FUNCTIONS
+
+/* The value of `EDOM' on the target machine.  */
+#define TARGET_EDOM 89
+
+/* This is how to create a rtl expression that refers to the global
+   "variable" `errno'.  */
+#define GEN_ERRNO_RTX \
+  gen_rtx (MEM, TARGET_SHORT ? HImode : SImode, \
+	   gen_rtx (SYMBOL_REF, Pmode, "errno"))
+
+#define FUNCTION_VALUEX(MODE)					\
+  gen_rtx (REG, (MODE), (TARGET_68881 && FLOAT_MODE_P (MODE) ? 16 : 0))
+
+#undef FUNCTION_VALUE
+#define FUNCTION_VALUE(VALTYPE,FUNC) FUNCTION_VALUEX (TYPE_MODE (VALTYPE))
+#undef LIBCALL_VALUE
+#define LIBCALL_VALUE(MODE) FUNCTION_VALUEX (MODE)
+
+/* 1 if N is a possible register number for a function value.  */
+
+#undef FUNCTION_VALUE_REGNO_P
+#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (TARGET_68881 && (N) == 16))
+
+/* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
+   more than one register.  */
+
+#undef NEEDS_UNTYPED_CALL
+#define NEEDS_UNTYPED_CALL (TARGET_68881)
+
+/* This is how to output an assembler line defining a `double' constant.  */
+
+#undef ASM_OUTPUT_DOUBLE
+#define ASM_OUTPUT_DOUBLE(FILE,VALUE)				\
+  {								\
+    if (REAL_VALUE_ISINF (VALUE))				\
+      {								\
+	if (REAL_VALUE_NEGATIVE (VALUE))			\
+	  fprintf (FILE, "\t.double 0r-Inf\n");			\
+	else							\
+	  fprintf (FILE, "\t.double 0rInf\n");			\
+      }								\
+    else if (REAL_VALUE_ISNAN (VALUE))				\
+      { long l[2];						\
+	REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);			\
+	fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", l[0], l[1]); \
+      }								\
+    else if (REAL_VALUE_MINUS_ZERO (VALUE))			\
+      {								\
+	fprintf (FILE, "\t.double 0r-0.0\n");			\
+      }								\
+    else							\
+      { char dstr[30];						\
+	REAL_VALUE_TO_DECIMAL (VALUE, "%.17g", dstr);		\
+	fprintf (FILE, "\t.double 0r%s\n", dstr);		\
+      }								\
+    }
+
+/* This is how to output an assembler line defining a `float' constant.  */
+
+#undef ASM_OUTPUT_FLOAT
+#define ASM_OUTPUT_FLOAT(FILE,VALUE)				\
+  {								\
+    if (REAL_VALUE_ISINF (VALUE))				\
+      {								\
+	if (REAL_VALUE_NEGATIVE (VALUE))			\
+	  fprintf (FILE, "\t.single 0r-Inf\n");			\
+	else							\
+	  fprintf (FILE, "\t.single 0rInf\n");			\
+      }								\
+    else if (REAL_VALUE_ISNAN (VALUE))				\
+      { long l;							\
+	REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);			\
+	fprintf (FILE, "\t.long 0x%lx\n", l);			\
+      }								\
+    else if (REAL_VALUE_MINUS_ZERO (VALUE))			\
+      {								\
+	fprintf (FILE, "\t.single 0r-0.0\n");			\
+      }								\
+    else							\
+      { char dstr[30];						\
+	REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr);		\
+	fprintf (FILE, "\t.single 0r%s\n", dstr);		\
+      }								\
+    }
+
+/* This is how to output an assembler lines defining floating operands.  */
+  
+#undef ASM_OUTPUT_FLOAT_OPERAND
+#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)		\
+ do {								\
+      if (CODE != 'f' || REAL_VALUE_ISNAN (VALUE))		\
+	{							\
+	  long l;						\
+	  REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);		\
+	  asm_fprintf (FILE, "%I");				\
+	  fprintf (FILE, "0x%lx", l);				\
+	}							\
+      else if (REAL_VALUE_ISINF (VALUE))			\
+	{							\
+	  if (REAL_VALUE_NEGATIVE (VALUE))			\
+	    asm_fprintf (FILE, "%I0r-Inf");			\
+	  else							\
+	    asm_fprintf (FILE, "%I0rInf");			\
+	}							\
+      else if (REAL_VALUE_MINUS_ZERO (VALUE))			\
+	{							\
+	  asm_fprintf (FILE, "%I0r-0.0");			\
+	}							\
+      else							\
+	{ char dstr[30];					\
+	  REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr);		\
+	  asm_fprintf (FILE, "%I0r%s", dstr);			\
+	}							\
+    } while (0)
+
+#undef ASM_OUTPUT_DOUBLE_OPERAND
+#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)				\
+ do { if (REAL_VALUE_ISINF (VALUE))					\
+	{								\
+	  if (REAL_VALUE_NEGATIVE (VALUE))				\
+	    asm_fprintf (FILE, "%I0r-Inf");				\
+	  else								\
+	    asm_fprintf (FILE, "%I0rInf");				\
+	}								\
+      else if (REAL_VALUE_ISNAN (VALUE))				\
+	{								\
+	  long l[2];							\
+	  REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);			\
+	  asm_fprintf (FILE, "%I");					\
+	  fprintf (FILE, "0x%lx%08lx", l[0], l[1]);			\
+	}								\
+      else if (REAL_VALUE_MINUS_ZERO (VALUE))				\
+	{								\
+	  asm_fprintf (FILE, "%I0r-0.0");				\
+	}								\
+      else								\
+	{ char dstr[30];						\
+	  REAL_VALUE_TO_DECIMAL (VALUE, "%.17g", dstr);			\
+	  asm_fprintf (FILE, "%I0r%s", dstr);				\
+	}								\
+    } while (0)
+
+/* given that symbolic_operand(X), return TRUE if no special
+   base relative relocation is necessary */
+
+#define LEGITIMATE_BASEREL_OPERAND_P(X) \
+  (flag_pic == 3 && read_only_operand (X))
+
+#undef LEGITIMATE_PIC_OPERAND_P
+#define LEGITIMATE_PIC_OPERAND_P(X) \
+  (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
+
+
+/* Define this macro if references to a symbol must be treated
+   differently depending on something about the variable or function
+   named by the symbol (such as what section it is in).
+
+   The macro definition, if any, is executed immediately after the
+   rtl for DECL has been created and stored in `DECL_RTL (DECL)'.
+   The value of the rtl will be a `mem' whose address is a
+   `symbol_ref'.
+
+   The usual thing for this macro to do is to record a flag in the
+   `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
+   name string in the `symbol_ref' (if one bit is not enough
+   information).
+
+   On the Atari we use this to indicate if a symbol is in text or
+   data space, as well as to distinguish functions from data. */
+
+#define ENCODE_SECTION_INFO(DECL)\
+do									\
+  {									\
+    if (TREE_CODE (DECL) == FUNCTION_DECL)				\
+      {									\
+        SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;		\
+	SYMBOL_REF_USED (XEXP (DECL_RTL (DECL), 0)) = 1;		\
+      }									\
+    else								\
+      {									\
+	rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'		\
+		   ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));		\
+	if (RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl))		\
+	  SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;				\
+      }									\
+  }									\
+while (0)
+
+#if 0
+#undef SELECT_RTX_SECTION
+#define SELECT_RTX_SECTION(MODE, X)					\
+{									\
+  if (!flag_pic || LEGITIMATE_BASEREL_OPERAND_P (X))			\
+    readonly_data_section();						\
+  else if (LEGITIMATE_PIC_OPERAND_P (X))				\
+    readonly_data_section();						\
+  else									\
+    data_section();							\
+}
+#else
+#undef SELECT_RTX_SECTION
+#define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
+#endif
+
+/* according to varasm.c, RELOC referrs *only* to whether constants (!)
+   are addressed by address. This doesn't matter in baserelative
+   code, so we allow (inspite of flag_pic) readonly_data_section() in
+   that case */
+
+#undef SELECT_SECTION
+#define SELECT_SECTION(DECL, RELOC)					\
+{									\
+  if (TREE_CODE (DECL) == STRING_CST)					\
+    {									\
+      if (flag_writable_strings)					\
+	data_section ();						\
+      else								\
+	readonly_data_section ();					\
+    }									\
+  else if (TREE_CODE (DECL) == VAR_DECL)				\
+    {									\
+      if (TREE_READONLY (DECL)						\
+	  && ! TREE_THIS_VOLATILE (DECL)				\
+	  && DECL_INITIAL (DECL)					\
+	  && (DECL_INITIAL (DECL) == error_mark_node			\
+	      || TREE_CONSTANT (DECL_INITIAL (DECL)))			\
+	  && !(flag_pic && flag_pic != 3 && RELOC))			\
+	readonly_data_section ();					\
+      else								\
+	data_section ();						\
+    }									\
+  else									\
+    readonly_data_section ();						\
+}
+
+#define ASM_OUTPUT_EXTERNAL_LIBCALL(asm_out_file,fun)
+
+/* Don't default to pcc-struct-return, because gcc is the only compiler, and
+   we want to retain compatibility with older gcc versions.  */
+#undef PCC_STATIC_STRUCT_RETURN
+#define DEFAULT_PCC_STRUCT_RETURN 0
+
+/* Define this macro if the system header files support C++ as well
+   as C.  This macro inhibits the usual method of using system header
+   files in C++, which is to pretend that the file's contents are
+   enclosed in `extern "C" {...}'.  */
+#define NO_IMPLICIT_EXTERN_C
diff -ruN gcc-2.7.2/config/m68k/xm-mint.h gcc-2.7.2-mint/config/m68k/xm-mint.h
--- gcc-2.7.2/config/m68k/xm-mint.h	Thu Jan  1 01:00:00 1970
+++ gcc-2.7.2-mint/config/m68k/xm-mint.h	Thu Nov  3 23:00:00 1994
@@ -0,0 +1,26 @@
+/* Configuration for GNU C-compiler for Atari ST family.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+
+#include "m68k/xm-m68k.h"
+
+#define NO_STAB_H
+#define HAVE_VPRINTF
+#define HAVE_ATEXIT
+#define HAVE_PUTENV
+#define HAVE_STRERROR
diff -ruN gcc-2.7.2/config.guess gcc-2.7.2-mint/config.guess
--- gcc-2.7.2/config.guess	Sun Nov 26 20:56:22 1995
+++ gcc-2.7.2-mint/config.guess	Sun Jul 28 00:14:34 1996
@@ -68,6 +68,9 @@
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
+    atari*:MiNT:*:*)
+	echo m68k-atari-mint
+	exit 0 ;;
     Pyramid*:OSx*:*:*)
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
 		echo pyramid-pyramid-sysv3
diff -ruN gcc-2.7.2/config.sub gcc-2.7.2-mint/config.sub
--- gcc-2.7.2/config.sub	Thu Jun 15 23:01:48 1995
+++ gcc-2.7.2-mint/config.sub	Sun Jul 28 00:13:08 1996
@@ -190,6 +190,9 @@
 		basic_machine=m68k-apollo
 		os=-sysv
 		;;
+	atari)
+		basic_machine=m68k-atari
+		;;
 	balance)
 		basic_machine=ns32k-sequent
 		os=-dynix
@@ -352,6 +355,10 @@
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
+	mint)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
@@ -641,7 +648,7 @@
 	      | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* )
+	      | -udi* | -eabi* | -lites* | -mint*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-sunos5*)
@@ -849,6 +856,10 @@
 				;;
 			-genix*)
 				vendor=ns
+				;;
+			-mint*)
+				vendor=atari
+				os=-mint
 				;;
 			-mvs*)
 				vendor=ibm
diff -ruN gcc-2.7.2/configure gcc-2.7.2-mint/configure
--- gcc-2.7.2/configure	Sun Nov 26 20:39:14 1995
+++ gcc-2.7.2-mint/configure	Fri Jul 26 17:04:32 1996
@@ -1300,6 +1300,18 @@
 		use_collect2=yes
 		extra_headers=math-68881.h
 		;;
+	m68k-atari-mint* | m68000-atari-mint*)	# Atari ST running MiNT
+       cpu_type=m68k
+		tm_file=m68k/mint.h
+		xm_file=m68k/xm-mint.h
+		tmake_file=m68k/t-mint
+		xmake_file=m68k/x-mint
+		fixincludes=Makefile.in
+		install_headers_dir=install-headers-cpio
+		case $machine in
+		  m68000-*-*) target_cpu_default=0 ;;
+		esac
+		;;
 	m68k-atari-sysv4*)              # Atari variant of V.4.
 		tm_file=m68k/atari.h
 		xm_file=m68k/xm-atari.h
diff -ruN gcc-2.7.2/getpwd.c gcc-2.7.2-mint/getpwd.c
--- gcc-2.7.2/getpwd.c	Wed May 17 00:25:04 1995
+++ gcc-2.7.2-mint/getpwd.c	Fri Jul 26 17:05:36 1996
@@ -14,7 +14,7 @@
    BSD systems) now provides getcwd as called for by POSIX.  Allow for
    the few exceptions to the general rule here.  */
 
-#if !(defined (POSIX) || defined (USG) || defined (VMS)) || defined (HAVE_GETWD)
+#if !(defined (POSIX) || defined (USG) || defined (VMS) || defined (atarist)) || defined (HAVE_GETWD)
 #include <sys/param.h>
 extern char *getwd ();
 #define getcwd(buf,len) getwd(buf)
Binary files gcc-2.7.2/libgcc1.cross and gcc-2.7.2-mint/libgcc1.cross differ
diff -ruN gcc-2.7.2/toplev.c gcc-2.7.2-mint/toplev.c
--- gcc-2.7.2/toplev.c	Fri Oct 20 23:56:34 1995
+++ gcc-2.7.2-mint/toplev.c	Fri Jul 26 17:06:46 1996
@@ -3907,7 +3907,7 @@
 
   compile_file (filename);
 
-#if !defined(OS2) && !defined(VMS) && !defined(_WIN32)
+#if !defined(OS2) && !defined(VMS) && !defined(_WIN32) && !defined (atarist)
   if (flag_print_mem)
     {
       char *lim = (char *) sbrk (0);
