iris5gas.h (DWARF2_DEBUGGING_INFO): Define.
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Fri, 19 Jul 2002 21:58:12 +0000 (21:58 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Fri, 19 Jul 2002 21:58:12 +0000 (21:58 +0000)
* 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

gcc/ChangeLog
gcc/config.gcc
gcc/config/mips/iris5gas.h
gcc/config/mips/iris6-o32-as.h
gcc/config/mips/iris6-o32-gas.h [new file with mode: 0644]
gcc/config/mips/iris6-o32.h
gcc/config/mips/t-iris5-gas [new file with mode: 0644]

index a0dea73ba5bdc07bd977c7e5fed2d50c9ceb6dbe..2e8b734631eb2d3c640f96ecd10d87bd8c7ef9de 100644 (file)
@@ -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.
index e33752b81ce8c29db552b383a440954a2d346136..a80b2ce712da7d42f0e67584f01d7522b0273dab 100644 (file)
@@ -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
index b8ac642f3b899e71ca6131192557908a2cbb0a10..a4985db87a5d23ad8fa2251c549e40d87e1f60d4 100644 (file)
@@ -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
index 8e975efd75782d663d835ff436dcc4b0a7e86c2f..6aafc7683d794af1635829a7d9f4a2cc73958a39 100644 (file)
 #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 (file)
index 0000000..fb540a9
--- /dev/null
@@ -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"
index c06f649194f7b7feefda05ea0f4078003872046e..3ef2fe40d67ae093f4b6b480858d3f57c38662d0 100644 (file)
    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 (file)
index 0000000..5d70c3f
--- /dev/null
@@ -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