From 245aefecd380b5793e97ff2fa605011152851ad7 Mon Sep 17 00:00:00 2001
From: Mark Mitchell <mark@codesourcery.com>
Date: Sat, 15 Jul 2000 00:15:18 +0000
Subject: [PATCH] mh-irix6 (CC): Don't set it.

	* config/mh-irix6 (CC): Don't set it.

	* INSTALL: Give special instructions for building GCC on Irix 6.
	* config/mips/x-iris6 (CC): Don't set it.
	(OLDCC): Likewise.

From-SVN: r35038
---
 ChangeLog               |  4 ++++
 config/mh-irix6         |  4 ----
 gcc/ChangeLog           |  6 ++++++
 gcc/INSTALL             | 15 +++++++++++++++
 gcc/config/mips/x-iris6 |  9 ---------
 5 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b3c3b374c7a7..41dfed564c48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul 14 18:13:23 2000  Mark P Mitchell  <mark@codesourcery.com>
+
+	* config/mh-irix6 (CC): Don't set it.
+
 2000-07-07  Phil Edwards  <pme@sourceware.cygnus.com>
 
 	* symlink-tree:  Check number of arguments.
diff --git a/config/mh-irix6 b/config/mh-irix6
index 6d25c16b2f45..e79267889630 100644
--- a/config/mh-irix6
+++ b/config/mh-irix6
@@ -1,7 +1,3 @@
 # Makefile changes for SGI's running IRIX-6.x.
 SYSV = -DSYSV
 RANLIB = true
-# Specify the ABI, to ensure that all Irix 6 systems will behave the same.
-# Also, using -32 avoids bugs that exist in the n32/n64 support in some
-# versions of the SGI compiler.
-CC = cc -32
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ff1ddd4e1686..d406bcdb7de5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jul 14 18:13:53 2000  Mark P Mitchell  <mark@codesourcery.com>
+
+	* INSTALL: Give special instructions for building GCC on Irix 6.
+	* config/mips/x-iris6 (CC): Don't set it.
+	(OLDCC): Likewise.
+
 2000-07-14  Jason Merrill  <jason@redhat.com>
 
 	* dwarf2out.c (dwarf2out_frame_debug_expr): If we store the CFA 
diff --git a/gcc/INSTALL b/gcc/INSTALL
index 37fca13c68e6..34eee22e0c38 100644
--- a/gcc/INSTALL
+++ b/gcc/INSTALL
@@ -1296,6 +1296,21 @@ special things you must know:
      and use the `--with-gnu-as' configure option when configuring gcc.
      GNU as is distributed as part of the binutils package.
 
+     Under Irix 6, if you are using Irix `cc' as your bootstrap
+     compiler, you must ensure that the N32 ABI is in use.  To test
+     this, compile a simple C file with `cc' and then run `file'
+     on the resulting object file.  The output should look like:
+
+ 		test.o:		ELF N32 MSB ...
+
+     If you see:
+
+	        test.o:		ELF 32-bit MSB
+
+     then your version of `cc' uses the O32 ABI default.  You should
+     set the environment variable `CC' to `cc -n32' before configuring
+     GCC.
+
 `mips-sony-sysv'
      Sony MIPS NEWS.  This works in NEWSOS 5.0.1, but not in 5.0.2
      (which uses ELF instead of COFF).  Support for 5.0.2 will probably
diff --git a/gcc/config/mips/x-iris6 b/gcc/config/mips/x-iris6
index 88c41f4dfe45..a9b39fa8f711 100644
--- a/gcc/config/mips/x-iris6
+++ b/gcc/config/mips/x-iris6
@@ -1,11 +1,2 @@
-# We force the use of the O32 ABI for two reasons.
-# 1) For consistency, because some versions of Irix 6 default to the O32 ABI
-#    and some versions default to the N64 ABI.
-# 2) To avoid SGI compiler bugs.  The v6.x and v7.0 compilers from SGI have
-#    bugs that cause gcc to be miscompiled when the N32 or N64 ABIs are used.
-#    The O32 ABI is known to be OK.
-CC = $(OLDCC)
-OLDCC = cc -32
-
 # Find all of the declarations from the header files
 FIXPROTO_DEFINES= -D__EXTENSIONS__  -D_SGI_SOURCE -D_LANGUAGE_C_PLUS_PLUS