aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>2002-07-19 21:58:12 +0000
committerRainer Orth <ro@gcc.gnu.org>2002-07-19 21:58:12 +0000
commit59267987dbc7bc330557f4fdfdb574fc797f6c84 (patch)
tree20c4a896f455c9aa730ac9f2687b348b861d27b2 /gcc
parent75aef48add6b3ecf07c6dccee00050162e2058db (diff)
downloadgcc-59267987dbc7bc330557f4fdfdb574fc797f6c84.zip
gcc-59267987dbc7bc330557f4fdfdb574fc797f6c84.tar.gz
gcc-59267987dbc7bc330557f4fdfdb574fc797f6c84.tar.bz2
iris5gas.h (DWARF2_DEBUGGING_INFO): Define.
* config/mips/iris5gas.h (DWARF2_DEBUGGING_INFO): Define. (PREFERRED_DEBUGGING_TYPE): Use DWARF2_DEBUG. (LINK_SPEC): Define. (STARTFILE_SPEC): Define. (ENDFILE_SPEC): Define. * config/mips/iris6-o32.h (LINK_SPEC): Move ... * config/mips/iris6-o32-as.h (LINK_SPEC): ... here. * config/mips/iris6-o32-gas.h: New file. * config.gcc (mips-sgi-irix6*o32): Use it. * config/mips/t-iris5-gas: New file. * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. From-SVN: r55596
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/config.gcc4
-rw-r--r--gcc/config/mips/iris5gas.h32
-rw-r--r--gcc/config/mips/iris6-o32-as.h16
-rw-r--r--gcc/config/mips/iris6-o32-gas.h19
-rw-r--r--gcc/config/mips/iris6-o32.h16
-rw-r--r--gcc/config/mips/t-iris5-gas5
7 files changed, 91 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a0dea73..2e8b734 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,20 @@
+2002-07-19 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * config/mips/iris5gas.h (DWARF2_DEBUGGING_INFO): Define.
+ (PREFERRED_DEBUGGING_TYPE): Use DWARF2_DEBUG.
+ (LINK_SPEC): Define.
+ (STARTFILE_SPEC): Define.
+ (ENDFILE_SPEC): Define.
+
+ * config/mips/iris6-o32.h (LINK_SPEC): Move ...
+ * config/mips/iris6-o32-as.h (LINK_SPEC): ... here.
+
+ * config/mips/iris6-o32-gas.h: New file.
+ * config.gcc (mips-sgi-irix6*o32): Use it.
+
+ * config/mips/t-iris5-gas: New file.
+ * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it.
+
2002-07-19 Neil Booth <neil@daikokuya.co.uk>
* cppexp.c (ALWAYS_EVAL): Remove.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index e33752b..a80b2ce 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1748,11 +1748,12 @@ 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"
+ tm_file="mips/iris5.h mips/iris5gas.h mips/iris6-o32-gas.h"
if test x$stabs = xyes
then
tm_file="${tm_file} dbx.h"
fi
+ tmake_file=mips/t-iris5-gas
else
tm_file="mips/iris5.h mips/iris6-o32-as.h"
tmake_file=mips/t-iris5-as
@@ -1826,6 +1827,7 @@ mips-sgi-irix5*) # SGI System V.4., IRIX 5
then
tm_file="${tm_file} dbx.h"
fi
+ tmake_file=mips/t-iris5-gas
else
tm_file=mips/iris5.h
tmake_file=mips/t-iris5-as
diff --git a/gcc/config/mips/iris5gas.h b/gcc/config/mips/iris5gas.h
index b8ac642..a4985db 100644
--- a/gcc/config/mips/iris5gas.h
+++ b/gcc/config/mips/iris5gas.h
@@ -2,14 +2,44 @@
/* Enable debugging. */
#define DBX_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO
#define SDB_DEBUGGING_INFO
#define MIPS_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
/* GNU as does handle DWARF2 directives. */
#undef DWARF2_UNWIND_INFO
#define DWARF2_UNWIND_INFO 1
+/* Override iris5.h version to invoke [cd]tors and register eh frame
+ information. */
+#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: -call_shared -no_unresolved}}}} \
+%{rpath} -init __do_global_ctors -fini __do_global_dtors \
+%{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \
+-_SYSTYPE_SVR4"
+
+/* Override iris5.h versions to include crtbegin.o and crtend.o. */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+%{!static: \
+ %{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}} \
+%{static: \
+ %{pg:gcrt1.o%s} \
+ %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s libprof1.a%s} \
+ %{!p:/usr/lib/nonshared/crt1.o%s}}} \
+crtbegin.o%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s %{!shared:crtn.o%s}"
+
/* Irix 5 does not have some strange restrictions that Irix 3 had. */
#undef SET_FILE_NUMBER
#define SET_FILE_NUMBER() ++num_source_filenames
diff --git a/gcc/config/mips/iris6-o32-as.h b/gcc/config/mips/iris6-o32-as.h
index 8e975ef..6aafc76 100644
--- a/gcc/config/mips/iris6-o32-as.h
+++ b/gcc/config/mips/iris6-o32-as.h
@@ -11,3 +11,19 @@
#define SUBTARGET_ASM_OPTIMIZING_SPEC "\
%{noasmopt:-O0} \
%{!noasmopt:%{O|O1|O2|O3:-O2}}"
+
+/* 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"
diff --git a/gcc/config/mips/iris6-o32-gas.h b/gcc/config/mips/iris6-o32-gas.h
new file mode 100644
index 0000000..fb540a9
--- /dev/null
+++ b/gcc/config/mips/iris6-o32-gas.h
@@ -0,0 +1,19 @@
+/* Definitions of target machine for GNU compiler, for MIPS running IRIX 6
+ (O32 ABI) using the GNU assembler. */
+
+/* Enforce use of O32 linker, irrespective of SGI_ABI environment variable
+ and machine type (e.g., R8000 systems default to -64). Copied from
+ iris5gas.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} -init __do_global_ctors -fini __do_global_dtors \
+%{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \
+-_SYSTYPE_SVR4 \
+-32"
diff --git a/gcc/config/mips/iris6-o32.h b/gcc/config/mips/iris6-o32.h
index c06f649..3ef2fe4 100644
--- a/gcc/config/mips/iris6-o32.h
+++ b/gcc/config/mips/iris6-o32.h
@@ -66,19 +66,3 @@
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"
diff --git a/gcc/config/mips/t-iris5-gas b/gcc/config/mips/t-iris5-gas
new file mode 100644
index 0000000..5d70c3f
--- /dev/null
+++ b/gcc/config/mips/t-iris5-gas
@@ -0,0 +1,5 @@
+# For svr4 we build crtbegin.o and crtend.o which serve to add begin and
+# end labels to the .ctors and .dtors section when we link using gcc.
+
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
+CRTSTUFF_T_CFLAGS=-g1