3.2 PATCH: Support O32 ABI on IRIX 6 (take 2)

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Fri Jun 21 07:09:00 GMT 2002


This is a revised version of

	http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01051.html

with a few updates:

* It uses TARGET_OS_CPP_BUILTINS instead of CPP_PREDEFINES,
  SUBTARGET_CPP_SPEC in iris6-o32.h as Eric requested.

* iris5gas.h needs to undefine HAVE_GAS_SHF_MERGE (supported by gas 2.12
  and up): if it is left defined, varasm.c (mergeable_constant_section)
  emits .rodata.cst* sections, but the IRIX 6 O32 ld complains e.g. when
  linking gcc.c-torture/execute/ieee/920810-1.c:

ld: WARNING 86 : Section .rodata.cst8 of input file /var/tmp//ccI6JzEa.o not included as output.
ld: FATAL   87 : Input sections have not been specified for inclusion in a.out.  This is typically due to omissions in the -elspec file. See error messages above.
collect2: ld returned 4 exit status

  While it might be possible to create a specially-crafted elspec(5) file
  to deal with those sections, it's easier to avoid creating them in the
  first place.

* mips.c now defines TARGET_ASM_UNALIGNED_DI_OP NULL.  Otherwise the
  default definition from target-def.h (.8byte) is used, but the native as
  doesn't support it.  This lets causes bootstrap to fail when building
  libobjc.

* As discussed following the first version of this patch, the .mdebug.<ABI>
  sections are not created anymore since they are unnecessary to
  distinguish the IRIX ABIs.  The ld warnings are not normally seen since
  those sections are only created for TARGET_GAS, and gas doesn't support
  N32/N64 yet and thus isn't used for the irix6 configurations.

* Before the OSF/ROSE removal, mips.h defined ASM_DECLARE_FUNCTION_NAME
  with no expansion.  The removal patch silently removed this definition,
  so the default takes effect.  This breaks with the native as:

./xgcc -B./ -B/vol/gcc/share/mips-sgi-irix6.5o32/bin/ -isystem /vol/gcc/share/mips-sgi-irix6.5o32/include -isystem /vol/gcc/share/mips-sgi-irix6.5o32/sys-include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include     -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I/vol/gnu/src/gcc/gcc/gcc -I/vol/gnu/src/gcc/gcc/gcc/. -I/vol/gnu/src/gcc/gcc/gcc/config -I/vol/gnu/src/gcc/gcc/gcc/../include  -DL_negdi2 -c /vol/gnu/src/gcc/gcc/gcc/libgcc2.c -o libgcc/./_negdi2.o
as0: Error: /vol/gnu/src/gcc/gcc/gcc/libgcc2.c, line 1:.ent must precede the definition of the symbol __negdi2
as0: Error: /vol/gnu/src/gcc/gcc/gcc/libgcc2.c, line 1:Conflicting definition of symbol __negdi2
libmld: Internal: st_psym_ifd_isym: ifd (1) or isym (1048575) out of range

make[3]: *** [libgcc/./_negdi2.o] Error 1

  Here's the difference before and after the removal:

--- libgcc2.s	Wed Jun 19 21:36:10 2002
+++ /vol/gcc/obj/gcc-3.2-20020619/6.5o32-cc-as/gcc/libgcc2.s	Wed Jun 19 21:30:53 2002
@@ -94,6 +94,7 @@
 	.text
 	.align	2
 	.globl	__negdi2
+__negdi2:
 	.ent	__negdi2
 __negdi2:
 	.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, extra= 0

  Defining ASM_DECLARE_FUNCTION_NAME again fixes this problem.

The new patch survived bootstrap on mips-sgi-irix6.5 (with libgcj
included), mips-sgi-irix6.2o32 (with gas 2.12.1 both with and without
--enable-sjlj-exception) and mips-sgi-irix6.5o32 (with native as) with only
one regression compared to my previous testsuite results:

* All gcc.c-torture/execute/ieee/fp-cmp-4.c and fp-cmp-5.c tests fail in all
  four configurations:

e.g. 

+FAIL: gcc.c-torture/execute/ieee/fp-cmp-4.c compilation,  -O0 

/var/tmp//ccAJFvza.s: Assembler messages:
/var/tmp//ccAJFvza.s:64: Error: unrecognized opcode `c'
/var/tmp//ccAJFvza.s:102: Error: unrecognized opcode `c'

l.64:        c.uge.d $f2,$f0
l.102:	     c.ugt.d $f2,$f0

Neither gas 2.12.2 (or CVS gas) nor the native as supports the uge and ugt
conditions.

Ok for mainline now?

	Rainer


Mon Jun 10 21:59:34 2002  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* configure.in (mips*-*-irix6*o32): Enable stabs.

	gcc:
	* config.gcc (mips-sgi-irix6*o32): New configuration.

	* configure.in (libgcc_visibility): Disable for mips-sgi-irix6*o32
	configurations.

	* config/mips/iris6-o32-as.h: New file.
	* config/mips/irix6-o32.h: New file.
	
	* config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Define.
	(NM_FLAGS): Define.
	(HAVE_AS_SHF_MERGE): Undefine.

	* config/mips/t-iris5-as: New file.
	* config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it.

	* config/mips/t-iris6 (SHLIB_EXT, SHLIB_SOLINK, SHLIB_SONAME,
	SHLIB_NAME, SHLIB_MAP, SHLIB_OBJS, SHLIB_SLIBDIR_QUAL, SHLIB_LINK,
	SHLIB_INSTALL, SHLIB_MKMAP, SHLIB_MAPFILES, FPBIT, DPBIT,
	dp-bit.c, fp-bit.c): Move ...
	* config/mips/t-iris5-6: ... here.
	New file, shared by IRIX 5 and IRIX 6.
	* config.gcc (mips-sgi-irix6*o32, mips-sgi-irix6*,
	mips-sgi-irix5*): Use it.

	* config/mips/mips.c (mips_asm_file_start): Don't emit
	mdebug.<ABI> sections on IRIX 5/6.

	* config/mips/mips.h (ASM_DECLARE_FUNCTION_NAME): Uncomment old
	definition.

	gcc/testsuite:
	* gcc.misc-tests/linkage.exp: Handle mips-sgi-irix6*o32
	configuration and IRIX 6 O32 ABI.

	libstdc++-v3:
	* configure.target (target_os switch): Allow for irix6*o32
	configurations.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.153
diff -u -p -r1.153 configure.in
--- configure.in	9 Jun 2002 01:34:39 -0000	1.153
+++ configure.in	21 Jun 2002 12:23:31 -0000
@@ -515,6 +515,10 @@ fi
 # Default to using --with-stabs for certain targets.
 if test x${with_stabs} = x ; then
   case "${target}" in
+  mips*-*-irix6*o32)
+    with_stabs=yes;
+    withoptions="${withoptions} --with-stabs"
+    ;;
   mips*-*-irix6*)
     ;;
   mips*-*-* | alpha*-*-osf*)
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.216
diff -u -p -r1.216 config.gcc
--- gcc/config.gcc	20 Jun 2002 11:03:29 -0000	1.216
+++ gcc/config.gcc	21 Jun 2002 12:23:32 -0000
@@ -1742,6 +1742,29 @@ mcore-*-pe*)
 	tm_file=mcore/mcore-pe.h
 	tmake_file=mcore/t-mcore-pe
 	;;
+mips-sgi-irix6*o32)		# SGI System V.4., IRIX 6, O32 ABI
+	if test x$gas = xyes
+	then
+		tm_file="mips/iris5.h mips/iris5gas.h"
+		if test x$stabs = xyes
+		then
+			tm_file="${tm_file} dbx.h"
+		fi
+	else
+		tm_file="mips/iris5.h mips/iris6-o32-as.h"
+		tmake_file=mips/t-iris5-as
+	fi
+	tm_file="${tm_file} mips/iris6-o32.h"
+	tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6"
+	xm_defines=POSIX
+	xm_file=mips/xm-iris5.h
+	# mips-tfile doesn't work yet
+	# See comment in mips/iris5.h file.
+	use_collect2=yes
+#	if test x$enable_threads = xyes; then
+#		thread_file='irix'
+#	fi
+	;;
 mips-sgi-irix6*)		# SGI System V.4., IRIX 6
 	if test "x$gnu_ld" = xyes
 	then
@@ -1749,7 +1772,7 @@ mips-sgi-irix6*)		# SGI System V.4., IRI
 	else
 		tm_file=mips/iris6.h
 	fi
-	tmake_file="mips/t-iris mips/t-iris6"
+	tmake_file="mips/t-iris mips/t-iris5-6 mips/t-iris6"
 	xm_defines=POSIX
 #	if test x$enable_threads = xyes; then
 #		thread_file='irix'
@@ -1802,8 +1825,9 @@ mips-sgi-irix5*)		# SGI System V.4., IRI
 		fi
 	else
 		tm_file=mips/iris5.h
+		tmake_file=mips/t-iris5-as
 	fi
-	tmake_file=mips/t-iris
+	tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6"
 	xm_defines=POSIX
 	xm_file=mips/xm-iris5.h
 	# mips-tfile doesn't work yet
Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.605
diff -u -p -r1.605 configure.in
--- gcc/configure.in	15 Jun 2002 17:31:27 -0000	1.605
+++ gcc/configure.in	21 Jun 2002 12:23:38 -0000
@@ -1592,6 +1594,15 @@ if test x"$gcc_cv_as_hidden" = xyes; the
 fi
 AC_MSG_RESULT($gcc_cv_as_hidden)
 libgcc_visibility=$gcc_cv_as_hidden
+case "$target" in
+  mips-sgi-irix6*o32)
+    if test x"$gnu_ld_flag" = x"no"; then
+      # Even if using gas with .hidden support, the resulting object files
+      # cannot be linked with the IRIX 6 O32 linker.
+      libgcc_visibility=no
+    fi
+    ;;
+esac
 AC_SUBST(libgcc_visibility)
 
 AC_MSG_CHECKING(assembler leb128 support)
Index: gcc/config/mips/iris5gas.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris5gas.h,v
retrieving revision 1.7
diff -u -p -r1.7 iris5gas.h
--- gcc/config/mips/iris5gas.h	11 Nov 2001 05:56:43 -0000	1.7
+++ gcc/config/mips/iris5gas.h	21 Jun 2002 12:23:51 -0000
@@ -34,3 +34,16 @@ do {                                    
   extern FILE *asm_out_text_file;                     \
   fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a));        \
 } while (0)
+
+/* Switch into a generic section.  */
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION  default_elf_asm_named_section
+
+/* Add -g to mips.h default to avoid confusing gas with local symbols
+   generated from stabs info.  */
+#undef NM_FLAGS
+#define NM_FLAGS "-Bng"
+
+/* Disable SHF_MERGE support.  Even if gas supports it, the IRIX ld does not
+   without a special elspec(5) file.  */
+#undef HAVE_GAS_SHF_MERGE
Index: gcc/config/mips/iris6-o32-as.h
===================================================================
RCS file: gcc/config/mips/iris6-o32-as.h
diff -N gcc/config/mips/iris6-o32-as.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/mips/iris6-o32-as.h	21 Jun 2002 12:23:51 -0000
@@ -0,0 +1,13 @@
+/* Definitions of target machine for GNU compiler, for MIPS running IRIX 6
+   (O32 ABI) using the SGI assembler.  */
+
+/* Override mips.h default: the IRIX 6 O32 assembler warns about -O3:
+
+   as: Warning: -O3 is not supported for assembly compiles for ucode
+   compilers; changing to -O2.
+   
+   So avoid passing it in the first place.  */
+#undef SUBTARGET_ASM_OPTIMIZING_SPEC
+#define SUBTARGET_ASM_OPTIMIZING_SPEC "\
+%{noasmopt:-O0} \
+%{!noasmopt:%{O|O1|O2|O3:-O2}}"
Index: gcc/config/mips/iris6-o32.h
===================================================================
RCS file: gcc/config/mips/iris6-o32.h
diff -N gcc/config/mips/iris6-o32.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/mips/iris6-o32.h	21 Jun 2002 12:23:51 -0000
@@ -0,0 +1,84 @@
+/* Definitions of target machine for GNU compiler, for MIPS running IRIX 6
+   (O32 ABI).  */
+
+/* The O32 ABI on IRIX 6 defaults to the mips2 ISA.  */
+#undef MIPS_ISA_DEFAULT
+#define MIPS_ISA_DEFAULT 2
+
+/* Specify wchar_t and wint_t types.  */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "long int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef WINT_TYPE
+#define WINT_TYPE "long int"
+
+#undef WINT_TYPE_SIZE
+#define WINT_TYPE_SIZE 32
+
+/* Copied from iris5.h, with _MIPS_SIM definition adapted to SGI cc usage
+   and -D_LONGLONG added as in iris6.h.  */
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()			\
+    do {						\
+	builtin_define_std ("host_mips");		\
+	builtin_define_std ("sgi");			\
+	builtin_define_std ("unix");			\
+	builtin_define_std ("SYSTYPE_SVR4");		\
+	builtin_define ("_LONGLONG");			\
+	builtin_define ("_MODERN_C");			\
+	builtin_define ("_SVR4_SOURCE");		\
+	builtin_define ("__DSO__");			\
+	builtin_define ("_ABIO32=1");			\
+	builtin_define ("_MIPS_SIM=_ABIO32");		\
+	builtin_define ("_MIPS_SZPTR=32");		\
+	builtin_assert ("system=unix");			\
+	builtin_assert ("system=svr4");			\
+	builtin_assert ("machine=sgi");			\
+							\
+     if (!TARGET_FLOAT64)                               \
+        builtin_define ("_MIPS_FPSET=16");              \
+     else                                               \
+        builtin_define ("_MIPS_FPSET=32");              \
+							\
+     if (!TARGET_INT64)                                 \
+        builtin_define ("_MIPS_SZINT=32");              \
+     else                                               \
+        builtin_define ("_MIPS_SZINT=64");              \
+							\
+     if (!TARGET_LONG64)				\
+	builtin_define ("_MIPS_SZLONG=32");		\
+     else						\
+	builtin_define ("_MIPS_SZLONG=64");		\
+							\
+     if (!flag_iso)					\
+       {						\
+	 builtin_define ("__EXTENSIONS__");		\
+	 builtin_define ("_SGI_SOURCE");		\
+       }						\
+} while (0);
+
+/* Enforce use of O32 assembler, irrespective of SGI_ABI environment variable
+   and machine type (e.g., R8000 systems default to -64).  Gas doesn't need
+   this, but doesn't hurt either.  Need to pass -mips2 to gas which defaults
+   to -mips1 if no ISA is specified.  */
+#undef SUBTARGET_ASM_SPEC
+#define SUBTARGET_ASM_SPEC "-32 %{!mips*:-mips2}"
+
+/* Enforce use of O32 linker, irrespective of SGI_ABI environment variable
+   and machine type (e.g., R8000 systems default to -64).  Copied from
+   iris5.h, only adding -32.  The default options -call_shared -no_unresolved
+   are only passed if not invoked with -r.  */
+#undef LINK_SPEC
+#define LINK_SPEC "\
+%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
+%{bestGnum} %{shared} %{non_shared} \
+%{call_shared} %{no_archive} %{exact_version} \
+%{static: -non_shared} \
+%{!static: \
+  %{!shared:%{!non_shared:%{!call_shared:%{!r: -call_shared -no_unresolved}}}}} \
+%{rpath} \
+-_SYSTYPE_SVR4 \
+-32"
Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.209
diff -u -p -r1.209 mips.c
--- gcc/config/mips/mips.c	12 Jun 2002 18:07:32 -0000	1.209
+++ gcc/config/mips/mips.c	21 Jun 2002 12:23:52 -0000
@@ -557,6 +557,8 @@ enum reg_class mips_char_to_class[256] =
 #define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.half\t"
 #undef TARGET_ASM_UNALIGNED_SI_OP
 #define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.word\t"
+#undef TARGET_ASM_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP NULL
 #endif
 
 #undef TARGET_ASM_FUNCTION_PROLOGUE
@@ -6252,13 +6254,14 @@ mips_asm_file_start (stream)
 
   if (TARGET_GAS)
     {
-#if defined(OBJECT_FORMAT_ELF)
+#if defined(OBJECT_FORMAT_ELF) && !(TARGET_IRIX5 || TARGET_IRIX6)
       /* Generate a special section to describe the ABI switches used to
 	 produce the resultant binary.  This used to be done by the assembler
 	 setting bits in the ELF header's flags field, but we have run out of
 	 bits.  GDB needs this information in order to be able to correctly
-	 debug these binaries. See the function mips_gdbarch_init() in
-	 gdb/mips-tdep.c.  */
+	 debug these binaries.  See the function mips_gdbarch_init() in
+	 gdb/mips-tdep.c.  This is unnecessary for the IRIX 5/6 ABIs and
+         causes unnecessary IRIX 6 ld warnings.  */
       const char * abi_string = NULL;
 
       switch (mips_abi)
Index: gcc/config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.191
diff -u -p -r1.191 mips.h
--- gcc/config/mips/mips.h	12 Jun 2002 23:26:44 -0000	1.191
+++ gcc/config/mips/mips.h	21 Jun 2002 12:23:57 -0000
@@ -4333,10 +4333,8 @@ do {							\
    emitting the label is moved to function_prologue, so that we can
    get the line number correctly emitted before the .ent directive,
    and after any .file directives.  */
-/*
 #undef ASM_DECLARE_FUNCTION_NAME
 #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL)
-*/
 
 /* This is how to output an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.  */
Index: gcc/config/mips/t-iris5-6
===================================================================
RCS file: gcc/config/mips/t-iris5-6
diff -N gcc/config/mips/t-iris5-6
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/mips/t-iris5-6	21 Jun 2002 12:23:57 -0000
@@ -0,0 +1,45 @@
+# Build a shared libgcc library.
+SHLIB_EXT = .so
+SHLIB_SOLINK = @shlib_base_name@.so
+SHLIB_SONAME = @shlib_so_name@.so.1
+SHLIB_NAME = @shlib_dir@@shlib_so_name@.so.1
+SHLIB_MAP = @shlib_map_file@
+SHLIB_OBJS = @shlib_objs@
+SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
+
+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+        -Wl,-soname,$(SHLIB_SONAME) \
+	-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
+	rm -f $(SHLIB_SOLINK) && \
+	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
+# ??? Irix 6.5 seems to eat the option fine (if we somehow remove the
+# -hidden_symbol option, which is documented to be ignored in conjunction
+# with -exports_file), but fails to actually hide any symbols.
+#	-Wl,-exports_file,$(SHLIB_MAP)
+
+# $(slibdir) double quoted to protect it from expansion while building
+# libgcc.mk.  We want this delayed until actual install time.
+SHLIB_INSTALL = \
+	$$(SHELL) $$(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
+	$(INSTALL_DATA) $(SHLIB_NAME) \
+	  $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
+	rm -f $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
+	$(LN_S) $(SHLIB_SONAME) \
+	  $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
+SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver 
+
+# We want fine grained libraries, so use the new code to build the
+# floating point emulation libraries.
+FPBIT = fp-bit.c
+DPBIT = dp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#undef US_SOFTWARE_GOFAST' > dp-bit.c
+	echo '#undef FLOAT' >> dp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define FLOAT' > fp-bit.c
+	echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
Index: gcc/config/mips/t-iris5-as
===================================================================
RCS file: gcc/config/mips/t-iris5-as
diff -N gcc/config/mips/t-iris5-as
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/mips/t-iris5-as	21 Jun 2002 12:23:57 -0000
@@ -0,0 +1,7 @@
+# omit -g, gcc doesn't support the o32 mdebug debugging format and warns about
+# every invokation with -g*
+# add -save-temps to avoid comparison failure due to embedded temp file names
+BOOT_CFLAGS = -O2 -save-temps
+
+# omit -g1
+LIBGCC2_DEBUG_CFLAGS =
Index: gcc/config/mips/t-iris6
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/t-iris6,v
retrieving revision 1.13
diff -u -p -r1.13 t-iris6
--- gcc/config/mips/t-iris6	10 May 2002 15:25:58 -0000	1.13
+++ gcc/config/mips/t-iris6	21 Jun 2002 12:23:57 -0000
@@ -14,52 +14,7 @@ INSTALL_LIBGCC = install-multilib
 EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
 CRTSTUFF_T_CFLAGS=-g1
 
-# Build a shared libgcc library.
-SHLIB_EXT = .so
-SHLIB_SOLINK = @shlib_base_name@.so
-SHLIB_SONAME = @shlib_so_name@.so.1
-SHLIB_NAME = @shlib_dir@@shlib_so_name@.so.1
-SHLIB_MAP = @shlib_map_file@
-SHLIB_OBJS = @shlib_objs@
-SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 SHLIB_SLIBDIR_SUFFIXES = mabi=64:/mabi=64 mabi=n32:
-
-SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-        -Wl,-soname,$(SHLIB_SONAME) \
-	-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
-	rm -f $(SHLIB_SOLINK) && \
-	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
-# ??? Irix 6.5 seems to eat the option fine (if we somehow remove the
-# -hidden_symbol option, which is documented to be ignored in conjunction
-# with -exports_file), but fails to actually hide any symbols.
-#	-Wl,-exports_file,$(SHLIB_MAP)
-
-# $(slibdir) double quoted to protect it from expansion while building
-# libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = \
-	$$(SHELL) $$(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIB_NAME) \
-	  $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
-	rm -f $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
-	$(LN_S) $(SHLIB_SONAME) \
-	  $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
-SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
-SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver 
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#undef US_SOFTWARE_GOFAST' > dp-bit.c
-	echo '#undef FLOAT' >> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
 # This is only needed in the static libgcc as a band-aid until gcc correctly
 # implements the N32/N64 ABI structure passing conventions
Index: gcc/testsuite/gcc.misc-tests/linkage.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.misc-tests/linkage.exp,v
retrieving revision 1.8
diff -u -p -r1.8 linkage.exp
--- gcc/testsuite/gcc.misc-tests/linkage.exp	4 Apr 2002 00:18:02 -0000	1.8
+++ gcc/testsuite/gcc.misc-tests/linkage.exp	21 Jun 2002 12:24:19 -0000
@@ -32,9 +32,15 @@ if [isnative] then {
 	    if [ string match "*64*" $file_string ] {
 		set native_cflags "-64"
 	    }
+	    if [ string match "*ELF 32*" $file_string ] {
+		set native_cflags "-32"
+	    }
 	    if [ string match "*N32*" $file_string ] {
 		set native_cflags "-n32"
 	    }
+	}
+	if  [istarget "mips-sgi-iris6*o32" ] {
+	    set native_cflags "-32"
 	}
 	if  [istarget "sparc*-sun-solaris2*"] {
 	    set file_string [exec file "linkage-x.o"]
Index: libstdc++-v3/configure.target
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.target,v
retrieving revision 1.41
diff -u -p -r1.41 configure.target
--- libstdc++-v3/configure.target	11 Jun 2002 17:54:25 -0000	1.41
+++ libstdc++-v3/configure.target	21 Jun 2002 12:24:34 -0000
@@ -83,11 +83,11 @@ case "${target_os}" in
   linux* | gnu*)
     os_include_dir="config/os/gnu-linux"
     ;;
-  irix[1-6] | irix[1-5].* | irix6.[0-4])
+  irix[1-6] | irix[1-5].* | irix6.[0-4]*)
    # This is known to work on at least IRIX 5.2 and 6.3.
    os_include_dir="config/os/irix/irix5.2"
    ;;
-  irix6.5)
+  irix6.5*)
     os_include_dir="config/os/irix/irix6.5"
     ;;
   mingw32*)



More information about the Gcc-patches mailing list