This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[ada, v3, doc] Remove obsolete IRIX 5/6 support
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org, Arnaud Charlet <charlet at adacore dot com>, Richard Sandiford <rdsandiford at googlemail dot com>, Bruce Korb <bkorb at gnu dot org>
- Date: Fri, 09 Apr 2010 20:02:30 +0200
- Subject: [ada, v3, doc] Remove obsolete IRIX 5/6 support
Here's the last of my removal patches: IRIX 5 and IRIX 6 < 6.5 support
is gone, as is support for the O32 ABI on IRIX 6.5.
Most of this should be straightforward and not require approval, but a
few changes touch common code (mips.c/mips.h for example). As I've done
for the Tru64 UNIX V4/V5.0 removal, I've merged iris.h into iris6.h,
updating a few comments etc. on the way. Along the same line, I've
changed all instances of TARGET_IRIX to now use TARGET_IRIX6
exclusively. I haven't merged t-iris and t-iris6, though, since the
former only affects libgcc and will move to toplevel libgcc in a
subsequent patch. I haven't included removed files in the patch below.
During testing, I've found that the coment about HAVE_GAS_SHF_MERGE is
wrong: removing the redefinition breaks bootstrap for the N32 and N64
ABIs with SGI ld, too. Obviously that linker cannot handle SHF_MERGE
and chokes trying to link libgcc_s.so.1 in stage 1:
ld32: FATAL 2 : Internal: at ../../ld/multigot.c lgot_local_got_offset() seg_ndx exceeds per_seg_lgot_table
ld32: INFO 152: Output file removed because of error.
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
I suppose I need approval for the Ada and libstdc++ parts, though they
are practivally obvious.
There are a couple of open issues, though:
* dbxmdebug.h is only used with --with-stabs, both are probably
obsolete, but I'll investigate.
* There are three fixincludes fixes where comments claim they apply to
IRIX 5 or even 4 only:
irix_asm_apostrophe
struct_file
struct_sockaddr
Since there's nothing in the fixes proper that guarantees that they
aren't applicable elsewhere, I've left them alone.
* There's a comment in gcc/ginclude/stddef.h which refers to IRIX 5.1:
/* Irix 5.1 needs this. */
#define __STDDEF_H__
but again, since I've no way of verifying that the comment still
applies, I haven't touched this.
I've verified that bootstrap on mips-sgi-irix5.3 fails configuring gcc
with an appropriate error message. The same happens on IRIX 6.5 when
configuring for mips-sgi-irix6.2. Bootstrap on mips-sgi-irix6.5 is
still in progress, ok for mainline if it passes?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2010-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc:
* config.gcc: Removed mips-sgi-irix5*, mips-sgi-irix6.[0-4]* from
list of obsolete configurations.
(mips-sgi-irix[56]*): Restrict to mips-sgi-irix6.5*.
Removed support for previous versions.
* config/mips/iris.h: Removed.
* config/mips/iris5.h: Removed.
* config/mips/iris6.h: Merged old iris.h contents.
(TARGET_IRIX): Removed.
(DRIVER_SELF_SPECS): Removed mabi=32.
(IDENT_ASM_OP): Removed undef.
(STARTFILE_SPEC): Removed mabi=32.
(ENDFILE_SPEC): Likewise.
(IRIX_SUBTARGET_LINK_SPEC): Likewise.
(MACHINE_TYPE): Update for IRIX 6.5.
* config/mips/mips.c (mips_build_builtin_va_list): Replaced
TARGET_IRIX by TARGET_IRIX6.
(mips_file_start): Likewise.
(mips_output_external): Remove IRIX 5/6 O32 support.
(mips_output_function_prologue): Likewise.
* config/mips/mips.h (TARGET_GPWORD): Replaced TARGET_IRIX by
TARGET_IRIX6.
(TARGET_CPU_CPP_BUILTINS): Likewise.
(TARGET_IRIX): Removed.
* config/mips/t-iris6 (MULTILIB_OPTIONS): Removed mabi=32.
(MULTILIB_DIRNAMES): Removed 32.
(MULTILIB_OSDIRNAMES): Removed ../lib.
* doc/install.texi (Prerequisites): Don't reference IRIX before
6.5.
(Specific, mips-sgi-irix5): Document removal.
(Specific, mips-sgi-irix6): Document IRIX 6.[0-4] and O32 ABI
removal.
Remove references to older IRIX 6 releases and the O32 ABI.
gcc/ada:
* gcc-interface/Makefile.in: Removed mips-sgi-irix5* support.
libstdc++-v3:
* configure.host: Removed irix[1-6], irix[1-5].*, irix6.[0-4]*
support.
* config/os/irix/irix5.2: Removed.
diff -r 0ed8e403dafa gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/Makefile.in Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/ada/gcc-interface/Makefile.in Fri Apr 09 19:44:06 2010 +0200
@@ -1238,47 +1238,38 @@
LIBRARY_VERSION := $(LIB_VERSION)
endif
-ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
- ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<a-intnam-irix.ads \
- s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-irix.adb \
- s-mastop.adb<s-mastop-irix.adb \
- s-osinte.adb<s-osinte-irix.adb \
- s-osinte.ads<s-osinte-irix.ads \
- s-osprim.adb<s-osprim-posix.adb \
- s-proinf.adb<s-proinf-irix-athread.adb \
- s-proinf.ads<s-proinf-irix-athread.ads \
- s-taprop.adb<s-taprop-irix.adb \
- s-tasinf.ads<s-tasinf-irix.ads \
- s-taspri.ads<s-taspri-posix.ads \
- s-tpopsp.adb<s-tpopsp-posix.adb \
- s-traceb.adb<s-traceb-mastop.adb
+ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-irix.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-irix.adb \
+ s-mastop.adb<s-mastop-irix.adb \
+ s-osinte.adb<s-osinte-irix.adb \
+ s-osinte.ads<s-osinte-irix.ads \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-proinf.adb<s-proinf-irix-athread.adb \
+ s-proinf.ads<s-proinf-irix-athread.ads \
+ s-taprop.adb<s-taprop-irix.adb \
+ s-tasinf.ads<s-tasinf-irix.ads \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ s-traceb.adb<s-traceb-mastop.adb
- ifeq ($(strip $(MULTISUBDIR)),/64)
+ ifeq ($(strip $(MULTISUBDIR)),/64)
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-irix-n64.ads
+ else
+ ifeq ($(strip $(MULTISUBDIR)),/32)
LIBGNAT_TARGET_PAIRS += \
- system.ads<system-irix-n64.ads
+ system.ads<system-irix-o32.ads
else
- ifeq ($(strip $(MULTISUBDIR)),/32)
- LIBGNAT_TARGET_PAIRS += \
- system.ads<system-irix-o32.ads
- else
- LIBGNAT_TARGET_PAIRS += \
- system.ads<system-irix-n32.ads
- endif
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-irix-n32.ads
endif
+ endif
- THREADSLIB = -lpthread
- GNATLIB_SHARED = gnatlib-shared-default
-
- else
- LIBGNAT_TARGET_PAIRS += \
- s-mastop.adb<s-mastop-irix.adb \
- s-osprim.adb<s-osprim-posix.adb \
- s-traceb.adb<s-traceb-mastop.adb \
- system.ads<system-irix-o32.ads
- endif
+ THREADSLIB = -lpthread
+ GNATLIB_SHARED = gnatlib-shared-default
EH_MECHANISM=-gcc
TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
diff -r 0ed8e403dafa gcc/config.gcc
--- a/gcc/config.gcc Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/config.gcc Fri Apr 09 19:44:06 2010 +0200
@@ -209,8 +209,6 @@
case ${target} in
alpha*-dec-osf4* \
| alpha*-dec-osf5.0* \
- | mips-sgi-irix5* \
- | mips-sgi-irix6.[0-4]* \
| *-*-solaris2.7* \
)
if test "x$enable_obsolete" != xyes; then
@@ -1676,32 +1674,13 @@
fi
use_gcc_stdint=wrap
;;
-mips-sgi-irix[56]*)
- tm_file="elfos.h ${tm_file} mips/iris.h"
- tmake_file="mips/t-iris mips/t-slibgcc-irix"
+mips-sgi-irix6.5*)
+ tm_file="elfos.h ${tm_file} mips/iris6.h"
+ tmake_file="mips/t-iris mips/t-iris6 mips/t-slibgcc-irix"
target_cpu_default="MASK_ABICALLS"
- case ${target} in
- *-*-irix5*)
- tm_file="${tm_file} mips/iris5.h"
- use_gcc_stdint=provide
- ;;
-
- *-*-irix6*)
- tm_file="${tm_file} mips/iris6.h"
- tmake_file="${tmake_file} mips/t-iris6"
- tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
- case ${target} in
- *-*-irix6.[0-4]*)
- use_gcc_stdint=provide
- ;;
- *-*-irix6.5*)
- # Only IRIX Development Foundation 1.3 for IRIX 6.5
- # provides stdint.h.
- use_gcc_stdint=wrap
- ;;
- esac
- ;;
- esac
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
+ # Only IRIX Development Foundation 1.3 for IRIX 6.5 provides stdint.h.
+ use_gcc_stdint=wrap
if test "x$stabs" = xyes
then
tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
diff -r 0ed8e403dafa gcc/config/mips/iris6.h
--- a/gcc/config/mips/iris6.h Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/config/mips/iris6.h Fri Apr 09 19:44:06 2010 +0200
@@ -1,6 +1,6 @@
-/* Definitions of target machine for GNU compiler. IRIX version 6.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2010
+/* Definitions of target machine for GNU compiler. IRIX 6.5 version.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
@@ -19,23 +19,28 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/* Allow some special handling for IRIX 6. */
+/* We are compiling for IRIX 6 now. */
#undef TARGET_IRIX6
#define TARGET_IRIX6 1
+#undef MACHINE_TYPE
+#define MACHINE_TYPE "SGI running IRIX 6.5"
+
/* Default to -mabi=n32 and -mips3. */
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mabi=n32" }
/* Force the default ABI onto the command line in order to make the specs
- easier to write. Default to the mips2 ISA for the O32 ABI. */
+ easier to write. */
#undef DRIVER_SELF_SPECS
#define DRIVER_SELF_SPECS \
"%{!mabi=*: -mabi=n32}", \
- "%{mabi=32: %{!mips*: %{!march*: -mips2}}}", \
/* Configuration-independent MIPS rules. */ \
BASE_DRIVER_SELF_SPECS
+/* MIPS specific debugging info */
+#define MIPS_DEBUGGING_INFO 1
+
/* Force the generation of dwarf .debug_frame sections even if not
compiling -g. This guarantees that we can unwind the stack. */
#define DWARF2_FRAME_INFO 1
@@ -45,48 +50,182 @@
#undef DWARF_FRAME_RETURN_COLUMN
#define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)
-#undef MACHINE_TYPE
-#define MACHINE_TYPE "SGI running IRIX 6.x"
+/* The size in bytes of a DWARF field indicating an offset or length
+ relative to a debug info section, specified to be 4 bytes in the DWARF-2
+ specification. The SGI/MIPS ABI defines it to be the same as PTR_SIZE. */
+#define DWARF_OFFSET_SIZE PTR_SIZE
+
+/* The size in bytes of the initial length field in a debug info
+ section. The DWARF 3 (draft) specification defines this to be
+ either 4 or 12 (with a 4-byte "escape" word when it's 12), but the
+ SGI/MIPS ABI predates this standard and defines it to be the same
+ as DWARF_OFFSET_SIZE. */
+#define DWARF_INITIAL_LENGTH_SIZE DWARF_OFFSET_SIZE
+
+/* MIPS assemblers don't have the usual .set foo,bar construct;
+ .set is used for assembler options instead. */
+#undef SET_ASM_OP
+#define ASM_OUTPUT_DEF(FILE, LABEL1, LABEL2) \
+ do \
+ { \
+ fputc ('\t', FILE); \
+ assemble_name (FILE, LABEL1); \
+ fputs (" = ", FILE); \
+ assemble_name (FILE, LABEL2); \
+ fputc ('\n', FILE); \
+ } \
+ while (0)
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX (TARGET_NEWABI ? "." : "$")
+
+#undef ASM_DECLARE_OBJECT_NAME
+#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
+
+#undef ASM_FINISH_DECLARE_OBJECT
+#define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
+
+/* The native IRIX 6 linker does not support merging without a special
+ elspec(5) file. */
+#ifndef IRIX_USING_GNU_LD
+#undef HAVE_GAS_SHF_MERGE
+#define HAVE_GAS_SHF_MERGE 0
+#endif
+
+/* Specify wchar_t types. */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE (Pmode == DImode ? "int" : "long int")
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
+
+/* Same for wint_t. */
+#undef WINT_TYPE
+#define WINT_TYPE (Pmode == DImode ? "int" : "long int")
+
+#undef WINT_TYPE_SIZE
+#define WINT_TYPE_SIZE 32
+
+/* C99 stdint.h types. */
+#define INT8_TYPE "signed char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "int"
+#define INT64_TYPE "long long int"
+#define UINT8_TYPE "unsigned char"
+#define UINT16_TYPE "short unsigned int"
+#define UINT32_TYPE "unsigned int"
+#define UINT64_TYPE "long long unsigned int"
+
+#define INT_LEAST8_TYPE "signed char"
+#define INT_LEAST16_TYPE "short int"
+#define INT_LEAST32_TYPE "int"
+#define INT_LEAST64_TYPE "long long int"
+#define UINT_LEAST8_TYPE "unsigned char"
+#define UINT_LEAST16_TYPE "short unsigned int"
+#define UINT_LEAST32_TYPE "unsigned int"
+#define UINT_LEAST64_TYPE "long long unsigned int"
+
+#define INT_FAST8_TYPE "signed char"
+#define INT_FAST16_TYPE "short int"
+#define INT_FAST32_TYPE "int"
+#define INT_FAST64_TYPE "long long int"
+#define UINT_FAST8_TYPE "unsigned char"
+#define UINT_FAST16_TYPE "short unsigned int"
+#define UINT_FAST32_TYPE "unsigned int"
+#define UINT_FAST64_TYPE "long long unsigned int"
+
+#define INTMAX_TYPE "long long int"
+#define UINTMAX_TYPE "long long unsigned int"
+
+#define INTPTR_TYPE "long int"
+#define UINTPTR_TYPE "long unsigned int"
+
+#define SIG_ATOMIC_TYPE "int"
+
+/* Plain char is unsigned in the SGI compiler. */
+#undef DEFAULT_SIGNED_CHAR
+#define DEFAULT_SIGNED_CHAR 0
+
+#define WORD_SWITCH_TAKES_ARG(STR) \
+ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
+ || strcmp (STR, "rpath") == 0)
+
+#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 ("_MODERN_C"); \
+ builtin_define ("_SVR4_SOURCE"); \
+ builtin_define ("__DSO__"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=svr4"); \
+ builtin_assert ("machine=sgi"); \
+ \
+ if (!ISA_MIPS1 && !ISA_MIPS2) \
+ builtin_define ("_COMPILER_VERSION=601"); \
+ \
+ /* We must always define _LONGLONG, even when -ansi is \
+ used, because IRIX 5 system header files require it. \
+ This is OK, because gcc never warns when long long \
+ is used in system header files. \
+ \
+ An alternative would be to support the SGI builtin \
+ type __long_long. */ \
+ builtin_define ("_LONGLONG"); \
+ \
+ /* IRIX 6.5.18 and above provide many ISO C99 \
+ features protected by the __c99 macro. \
+ libstdc++ v3 needs them as well. */ \
+ if (TARGET_IRIX6) \
+ if (flag_isoc99 || c_dialect_cxx ()) \
+ builtin_define ("__c99"); \
+ \
+ /* The GNU C++ standard library requires that \
+ __EXTENSIONS__ and _SGI_SOURCE be defined on at \
+ least IRIX 6.2 and probably all IRIX 6 prior to 6.5. \
+ We don't need this on IRIX 6.5 itself, but it \
+ shouldn't hurt other than the namespace pollution. */ \
+ if (!flag_iso || (TARGET_IRIX6 && c_dialect_cxx ())) \
+ { \
+ builtin_define ("__EXTENSIONS__"); \
+ builtin_define ("_SGI_SOURCE"); \
+ } \
+ } \
+ while (0)
+
+#undef SUBTARGET_CC1_SPEC
+#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC "%{pthread:-D_REENTRANT}"
+
+#undef INIT_SECTION_ASM_OP
+#define INIT_SECTION_ASM_OP "\t.section\t.gcc_init,\"ax\",@progbits"
+
+#undef FINI_SECTION_ASM_OP
+#define FINI_SECTION_ASM_OP "\t.section\t.gcc_fini,\"ax\",@progbits"
#ifdef IRIX_USING_GNU_LD
-#define IRIX_SUBTARGET_LINK_SPEC \
- "%{mabi=32: -melf32bsmip}%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
+#define IRIX_NO_UNRESOLVED ""
#else
- /* Explicitly hide crt symbols that would normally be marked with
- a "hidden" visibility attribute.
-
- We have traditionally disabled this attribute when using the
- native linker because the native linker's visibility support is
- not fully-compatible with the GNU linker's. In particular, the
- native linker does not pull in archive objects purely to resolve
- references to the object's hidden symbols, whereas the GNU
- linker does.
-
- The gcc build system currently hides symbols in some static
- libraries (typically libgcov.a or libgcc.a) whenever visibility
- attributes are supported. On targets with GNU semantics, this
- makes sure that uses of libx.so symbols in one dynamic object are
- not resolved to libx.a symbols in another dynamic object. But
- on targets with IRIX semantics, hiding the symbols prevents the
- static archive from working at all.
-
- It would probably be better to enable visiblity attributes for
- IRIX ld and disable the static archives versioning. It shouldn't
- make anything worse, since libx.a symbols are global by default
- anyway. However, no-one has volunteered to do this yet. */
+#define IRIX_NO_UNRESOLVED "-no_unresolved"
+#endif
-#define IRIX_SUBTARGET_LINK_SPEC \
- "%{w} -_SYSTYPE_SVR4 -woff 131 \
- %{shared:-hidden_symbol __dso_handle} \
- %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
+#ifdef IRIX_USING_GNU_LD
+#define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
+#define SUBTARGET_WARN_UNUSED_SPEC ""
+#else
+#define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
+#define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
#endif
/* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
- %{mabi=32:%{pg:gcrt1.o%s} \
- %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
%{mabi=n32: \
%{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
%{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
@@ -124,14 +263,75 @@
#define ENDFILE_SPEC \
"crtend.o%s irix-crtn.o%s \
%{!shared: \
- %{mabi=32:crtn.o%s}\
%{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
%{!mips4:/usr/lib32/mips3/crtn.o%s}}\
%{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
%{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
+/* Generic part of the LINK_SPEC. */
+#undef LINK_SPEC
+#define LINK_SPEC "\
+%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
+%{bestGnum} %{shared} %{non_shared} \
+%{call_shared} %{no_archive} %{exact_version} \
+%{!shared: \
+ %{!non_shared: %{!call_shared:%{!r: -call_shared " IRIX_NO_UNRESOLVED "}}}} \
+%{rpath} -init __gcc_init -fini __gcc_fini " IRIX_SUBTARGET_LINK_SPEC
+
+#ifdef IRIX_USING_GNU_LD
+#define IRIX_SUBTARGET_LINK_SPEC \
+ "%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
+#else
+ /* Explicitly hide crt symbols that would normally be marked with
+ a "hidden" visibility attribute.
+
+ We have traditionally disabled this attribute when using the
+ native linker because the native linker's visibility support is
+ not fully-compatible with the GNU linker's. In particular, the
+ native linker does not pull in archive objects purely to resolve
+ references to the object's hidden symbols, whereas the GNU
+ linker does.
+
+ The gcc build system currently hides symbols in some static
+ libraries (typically libgcov.a or libgcc.a) whenever visibility
+ attributes are supported. On targets with GNU semantics, this
+ makes sure that uses of libx.so symbols in one dynamic object are
+ not resolved to libx.a symbols in another dynamic object. But
+ on targets with IRIX semantics, hiding the symbols prevents the
+ static archive from working at all.
+
+ It would probably be better to enable visiblity attributes for
+ IRIX ld and disable the static archives versioning. It shouldn't
+ make anything worse, since libx.a symbols are global by default
+ anyway. However, no-one has volunteered to do this yet. */
+
+#define IRIX_SUBTARGET_LINK_SPEC \
+ "%{w} -_SYSTYPE_SVR4 -woff 131 \
+ %{shared:-hidden_symbol __dso_handle} \
+ %{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
+#endif
+
+/* A linker error can empirically be avoided by removing duplicate
+ library search directories. */
+#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1
+
+/* Add -g to mips.h default to avoid confusing gas with local symbols
+ generated from stabs info. */
+#undef NM_FLAGS
+#define NM_FLAGS "-Bng"
+
+/* The system header files are C++ aware. */
+/* ??? Unfortunately, most but not all of the headers are C++ aware.
+ Specifically, curses.h is not, and as a consequence, defining this
+ used to prevent libg++ building. This is no longer the case so
+ define it again to prevent other problems, e.g. with getopt in
+ unistd.h. We still need some way to fix just those files that need
+ fixing. */
+#define NO_IMPLICIT_EXTERN_C 1
+
+/* -G is incompatible with -KPIC which is the default, so only allow objects
+ in the small data section if the user explicitly asks for it. */
+#undef MIPS_DEFAULT_GVALUE
+#define MIPS_DEFAULT_GVALUE 0
+
#define MIPS_TFMODE_FORMAT mips_extended_format
-
-#undef SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC "%{pthread:-D_REENTRANT}"
-
diff -r 0ed8e403dafa gcc/config/mips/mips.c
--- a/gcc/config/mips/mips.c Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/config/mips/mips.c Fri Apr 09 19:44:06 2010 +0200
@@ -1,6 +1,6 @@
/* Subroutines used for MIPS code generation.
Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by A. Lichnewsky, lich@inria.inria.fr.
Changes by Michael Meissner, meissner@osf.org.
@@ -5449,7 +5449,7 @@
layout_type (record);
return record;
}
- else if (TARGET_IRIX && TARGET_IRIX6)
+ else if (TARGET_IRIX6)
/* On IRIX 6, this type is 'char *'. */
return build_pointer_type (char_type_node);
else
@@ -7864,19 +7864,6 @@
fprintf (file, ", " HOST_WIDE_INT_PRINT_DEC "\n",
int_size_in_bytes (TREE_TYPE (decl)));
}
- else if (TARGET_IRIX
- && mips_abi == ABI_32
- && TREE_CODE (decl) == FUNCTION_DECL)
- {
- /* In IRIX 5 or IRIX 6 for the O32 ABI, we must output a
- `.global name .text' directive for every used but
- undefined function. If we don't, the linker may perform
- an optimization (skipping over the insns that set $gp)
- when it is unsafe. */
- fputs ("\t.globl ", file);
- assemble_name (file, name);
- fputs (" .text\n", file);
- }
}
}
@@ -8166,7 +8153,7 @@
/* Generate a special section to describe the ABI switches used to
produce the resultant binary. This is unnecessary on IRIX and
causes unwanted warnings from the native linker. */
- if (!TARGET_IRIX)
+ if (!TARGET_IRIX6)
{
/* Record the ABI itself. Modern versions of binutils encode
this information in the ELF header flags, but GDB needs the
@@ -9811,10 +9798,6 @@
fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
mips_start_function_definition (fnname, TARGET_MIPS16);
- /* Stop mips_file_end from treating this function as external. */
- if (TARGET_IRIX && mips_abi == ABI_32)
- TREE_ASM_WRITTEN (DECL_NAME (cfun->decl)) = 1;
-
/* Output MIPS-specific frame information. */
if (!flag_inhibit_size_directive)
{
diff -r 0ed8e403dafa gcc/config/mips/mips.h
--- a/gcc/config/mips/mips.h Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/config/mips/mips.h Fri Apr 09 19:44:06 2010 +0200
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler. MIPS version.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by A. Lichnewsky (lich@inria.inria.fr).
Changed by Michael Meissner (meissner@osf.org).
@@ -228,7 +228,7 @@
#define TARGET_GPWORD \
(TARGET_ABICALLS \
&& !TARGET_ABSOLUTE_ABICALLS \
- && !(mips_abi == ABI_64 && TARGET_IRIX))
+ && !(mips_abi == ABI_64 && TARGET_IRIX6))
/* True if the output must have a writable .eh_frame.
See ASM_PREFERRED_EH_DATA_FORMAT for details. */
@@ -369,7 +369,6 @@
#define TARGET_SYNC_AFTER_SC (!TARGET_OCTEON)
/* IRIX specific stuff. */
-#define TARGET_IRIX 0
#define TARGET_IRIX6 0
/* Define preprocessor macros for the -march and -mtune options.
@@ -396,7 +395,7 @@
do \
{ \
/* Everyone but IRIX defines this to mips. */ \
- if (!TARGET_IRIX) \
+ if (!TARGET_IRIX6) \
builtin_assert ("machine=mips"); \
\
builtin_assert ("cpu=mips"); \
@@ -416,7 +415,7 @@
if (TARGET_64BIT) \
builtin_define ("__mips64"); \
\
- if (!TARGET_IRIX) \
+ if (!TARGET_IRIX6) \
{ \
/* Treat _R3000 and _R4000 like register-size \
defines, which is how they've historically \
diff -r 0ed8e403dafa gcc/config/mips/t-iris6
--- a/gcc/config/mips/t-iris6 Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/config/mips/t-iris6 Fri Apr 09 19:44:06 2010 +0200
@@ -1,5 +1,5 @@
# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
+# 2006, 2010 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -17,10 +17,10 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-MULTILIB_OPTIONS=mabi=n32/mabi=32/mabi=64
-MULTILIB_DIRNAMES=n32 32 64
+MULTILIB_OPTIONS=mabi=n32/mabi=64
+MULTILIB_DIRNAMES=n32 64
MULTILIB_MATCHES=
-MULTILIB_OSDIRNAMES=../lib32 ../lib ../lib64
+MULTILIB_OSDIRNAMES=../lib32 ../lib64
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff -r 0ed8e403dafa gcc/doc/install.texi
--- a/gcc/doc/install.texi Thu Apr 08 18:40:03 2010 +0200
+++ b/gcc/doc/install.texi Fri Apr 09 19:44:06 2010 +0200
@@ -360,7 +360,7 @@
Necessary to build link-time optimization (LTO) support. It can be
downloaded from @uref{http://www.mr511.de/software/libelf-0.8.12.tar.gz},
though it is commonly available in several systems. The versions in
-IRIX 5 and 6 don't work since they lack @file{gelf.h}. The version in
+IRIX 6.5 don't work since they lack @file{gelf.h}. The version in
recent releases of Solaris 11 does work, previous ones don't yet.
The @option{--with-libelf} configure option should be used if libelf is
@@ -3823,60 +3823,22 @@
@end html
@heading @anchor{mips-sgi-irix5}mips-sgi-irix5
-Support for IRIX 5 has been obsoleted in GCC 4.5, but can still be
-enabled by configuring with @option{--enable-obsolete}. Support will be
-removed in GCC 4.6.
-
-In order to compile GCC on an SGI running IRIX 5, the @samp{compiler_dev.hdr}
-subsystem must be installed from the IDO CD-ROM supplied by SGI@.
-It is also available for download from
-@uref{http://freeware.sgi.com/ido.html}.
-
-If you use the MIPS C compiler to bootstrap, it may be necessary
-to increase its table size for switch statements with the
-@option{-Wf,-XNg1500} option. If you use the @option{-O2}
-optimization option, you also need to use @option{-Olimit 3000}.
-@c FIXME: verify.
-
-GCC must be configured to use GNU @command{as}. The latest version, from GNU
-binutils 2.20.1, is known to work.
-
-To enable debugging under IRIX 5, you must use GNU binutils 2.15 or
-later, and use the @option{--with-gnu-ld} @command{configure} option
-when configuring GCC@.
-You need to use GNU @command{ar} and @command{nm},
-also distributed with GNU binutils.
-@c FIXME: which parts of this are still true?
-
-Configuring GCC with @command{/bin/sh} is @emph{extremely} slow and may
-even hang. This problem can be avoided by running @command{configure}
-like this:
-
-@smallexample
- % CONFIG_SHELL=/usr/local/bin/bash
- % export CONFIG_SHELL
- % $CONFIG_SHELL @var{srcdir}/configure [@var{options}]
-@end smallexample
-
-@noindent
-@command{/bin/ksh} doesn't work properly either.
+Support for IRIX 5 has been removed in GCC 4.6.
@html
<hr />
@end html
@heading @anchor{mips-sgi-irix6}mips-sgi-irix6
-Support for IRIX 6 releases before 6.5 has been obsoleted in GCC 4.5,
-but can still be enabled by configuring with @option{--enable-obsolete}.
-Support will be removed in GCC 4.6, which will also disable support for
+Support for IRIX 6 releases before 6.5 has been removed in GCC 4.6, as
+well as support for
the O32 ABI. It is @emph{strongly} recommended to upgrade to at least
IRIX 6.5.18. This release introduced full ISO C99 support, though for
the N32 and N64 ABIs only.
-To build and use GCC on IRIX 6, you need the IRIX Development Foundation
+To build and use GCC on IRIX 6.5, you need the IRIX Development Foundation
(IDF) and IRIX Development Libraries (IDL). They are included with the
-IRIX 6.5 media and can be downloaded from
-@uref{http://freeware.sgi.com/idf_idl.html} for older IRIX 6 releases.
+IRIX 6.5 media.
If you are using SGI's MIPSpro @command{cc} as your bootstrap compiler, you must
ensure that the N32 ABI is in use. To test this, compile a simple C
@@ -3933,11 +3895,11 @@
@code{memcmp}. Either add @code{-U__INLINE_INTRINSICS} to the @env{CC}
environment variable as a workaround or upgrade to MIPSpro C 7.4.1m.
-GCC on IRIX 6 is usually built to support the N32, O32 and N64 ABIs. If
+GCC on IRIX 6.5 is usually built to support the N32 and N64 ABIs. If
you build GCC on a system that doesn't have the N64 libraries installed
or cannot run 64-bit binaries,
you need to configure with @option{--disable-multilib} so GCC doesn't
-try to use them. This will disable building the O32 libraries, too.
+try to use them.
Look for @file{/usr/lib64/libc.so.1} to see if you
have the 64-bit libraries installed.
diff -r 0ed8e403dafa libstdc++-v3/configure.host
--- a/libstdc++-v3/configure.host Thu Apr 08 18:40:03 2010 +0200
+++ b/libstdc++-v3/configure.host Fri Apr 09 19:44:06 2010 +0200
@@ -245,12 +245,6 @@
hpux*)
os_include_dir="os/hpux"
;;
- 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="os/irix/irix5.2"
- atomicity_dir=os/irix
- atomic_word_dir=os/irix
- ;;
irix6.5*)
os_include_dir="os/irix/irix6.5"
atomicity_dir=os/irix