From: Rainer Orth Date: Tue, 17 Feb 2004 20:42:53 +0000 (+0000) Subject: t-iris6gld: Renamed to ... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e35cb0c025e4058c80e9d0fdb8e9ebb89eadd3c;p=gcc.git t-iris6gld: Renamed to ... * config/mips/t-iris6gld: Renamed to ... * config/mips/t-irix-gld: ... this. * config.gcc (mips-sgi-irix6*): Reflect this (mips-sgi-irix5*): Use it with GNU ld. * config/mips/irix6-crti.asm, config/mips/irix6-crtn.asm: Renamed to ... * config/mips/irix-crti.asm, config/mips/irix-crtn.asm: ... this. * config/mips/t-irix-gld: Reflect this. * config/mips/iris6gld.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/mips/iris5gld.h: New file. * config.gcc (mips-sgi-irix5*): Use it with GNU ld. Only use collect2 without gas. * config/mips/iris6.h (IRIX6_STARTFILE_SPEC, IRIX6_ENDFILE_SPEC): Renamed to IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC. (STARTFILE_SPEC, ENDFILE_SPEC, SUBTARGET_EXTRA_SPECS): Reflect this. * config/mips/iris6gld.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/mips/iris6.h (SUBTARGET_EXTRA_SPECS): Moved ... * config/mips/iris5.h: ... here. * config/mips/iris5.h (STARTFILE_SPEC, ENDFILE_SPEC): Renamed to IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC. (STARTFILE_SPEC, ENDFILE_SPEC): Define. * config/mips/iris5gas.h (STARTFILE_SPEC, ENDFILE_SPEC): Simplify using irix_startfile_spec, irix_endfile_spec. From-SVN: r77978 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff7bb7d8ee1..ec5367a84d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,35 @@ +2004-02-17 Rainer Orth + + * config/mips/t-iris6gld: Renamed to ... + * config/mips/t-irix-gld: ... this. + * config.gcc (mips-sgi-irix6*): Reflect this + (mips-sgi-irix5*): Use it with GNU ld. + + * config/mips/irix6-crti.asm, config/mips/irix6-crtn.asm: Renamed + to ... + * config/mips/irix-crti.asm, config/mips/irix-crtn.asm: ... this. + * config/mips/t-irix-gld: Reflect this. + * config/mips/iris6gld.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. + + * config/mips/iris5gld.h: New file. + * config.gcc (mips-sgi-irix5*): Use it with GNU ld. + Only use collect2 without gas. + + * config/mips/iris6.h (IRIX6_STARTFILE_SPEC, IRIX6_ENDFILE_SPEC): + Renamed to IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC. + (STARTFILE_SPEC, ENDFILE_SPEC, SUBTARGET_EXTRA_SPECS): Reflect this. + * config/mips/iris6gld.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. + + * config/mips/iris6.h (SUBTARGET_EXTRA_SPECS): Moved ... + * config/mips/iris5.h: ... here. + + * config/mips/iris5.h (STARTFILE_SPEC, ENDFILE_SPEC): Renamed to + IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC. + (STARTFILE_SPEC, ENDFILE_SPEC): Define. + + * config/mips/iris5gas.h (STARTFILE_SPEC, ENDFILE_SPEC): Simplify + using irix_startfile_spec, irix_endfile_spec. + 2004-02-16 Gunther Nikl * config/m68k/m68k.c: Remove obsolete support for HPUX_ASM. diff --git a/gcc/config.gcc b/gcc/config.gcc index 841bd189597..48f54440a8b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1258,7 +1258,7 @@ mips-sgi-irix6*) # SGI System V.4., IRIX 6 if test "x$gnu_ld" = xyes then tm_file="${tm_file} mips/iris6gld.h" - tmake_file="$tmake_file mips/t-iris6gld" + tmake_file="$tmake_file mips/t-irix-gld" fi target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT" tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" @@ -1298,11 +1298,19 @@ mips-sgi-irix5*) # SGI System V.4., IRIX 5 else tmake_file=mips/t-iris5-as fi + if test "x$gnu_ld" = xyes + then + tm_file="${tm_file} mips/iris5gld.h" + tmake_file="$tmake_file mips/t-irix-gld" + fi tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6" target_cpu_default="MASK_ABICALLS" # mips-tfile doesn't work yet # See comment in mips/iris5.h file. - use_collect2=yes + if test x$gas = xno + then + use_collect2=yes + fi # if test x$enable_threads = xyes; then # thread_file='irix' # fi diff --git a/gcc/config/mips/iris5.h b/gcc/config/mips/iris5.h index a1729863108..4114c928161 100644 --- a/gcc/config/mips/iris5.h +++ b/gcc/config/mips/iris5.h @@ -135,8 +135,7 @@ Boston, MA 02111-1307, USA. */ -_SYSTYPE_SVR4" /* We now support shared libraries. */ -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "\ +#define IRIX_STARTFILE_SPEC "\ %{!static: \ %{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}} \ %{static: \ @@ -144,11 +143,16 @@ Boston, MA 02111-1307, USA. */ %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s libprof1.a%s} \ %{!p:/usr/lib/nonshared/crt1.o%s}}}" +#undef STARTFILE_SPEC +#define STARTFILE_SPEC "%(irix_startfile_spec)" + #undef LIB_SPEC #define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}" +#define IRIX_ENDFILE_SPEC "%{!shared:crtn.o%s}" + #undef ENDFILE_SPEC -#define ENDFILE_SPEC "%{!shared:crtn.o%s}" +#define ENDFILE_SPEC "%(irix_endfile_spec)" /* We do not want to run mips-tfile! */ #undef ASM_FINAL_SPEC @@ -291,3 +295,8 @@ do { \ /* Handle #pragma weak and #pragma pack. */ #define HANDLE_SYSV_PRAGMA 1 + +#undef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS \ + { "irix_startfile_spec", IRIX_STARTFILE_SPEC }, \ + { "irix_endfile_spec", IRIX_ENDFILE_SPEC }, diff --git a/gcc/config/mips/iris5gas.h b/gcc/config/mips/iris5gas.h index f79bf3dd9d8..49af06b5367 100644 --- a/gcc/config/mips/iris5gas.h +++ b/gcc/config/mips/iris5gas.h @@ -43,17 +43,10 @@ /* 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" +#define STARTFILE_SPEC "%(irix_startfile_spec) crtbegin.o%s" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s %{!shared:crtn.o%s}" +#define ENDFILE_SPEC "crtend.o%s %(irix_endfile_spec)" /* Irix 5 does not have some strange restrictions that Irix 3 had. */ #undef SET_FILE_NUMBER diff --git a/gcc/config/mips/iris5gld.h b/gcc/config/mips/iris5gld.h new file mode 100644 index 00000000000..cd4eb86a889 --- /dev/null +++ b/gcc/config/mips/iris5gld.h @@ -0,0 +1,75 @@ +/* Definitions of target machine for GNU compiler. IRIX 5 with GNU ld. + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#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}}}} \ +%{rpath} -init __gcc_init -fini __gcc_fini \ +-melf32bsmip" + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC "%(irix_startfile_spec) irix-crti.o%s crtbegin.o%s" + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "crtend.o%s irix-crtn.o%s %(irix_endfile_spec)" + +/* The GNU linker supports one-only sections. */ +#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) + +#define INIT_SECTION_ASM_OP "\t.section\t.init,0x1,0x6,4,4" +#define FINI_SECTION_ASM_OP "\t.section\t.fini,0x1,0x6,4,4" +/* Definitions of target machine for GNU compiler. IRIX 5 with GNU ld. + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#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}}}} \ +%{rpath} -init __do_global_ctors -fini __do_global_dtors \ +-melf32bsmip" + +/* The GNU linker supports one-only sections. */ +#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index b2bcb1a00c2..33d6b09825a 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -394,7 +394,8 @@ while (0) /* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */ /* ??? If no mabi=X option give, but a mipsX option is, then should depend on the mipsX option. */ -#define IRIX6_STARTFILE_SPEC \ +#undef IRIX_STARTFILE_SPEC +#define IRIX_STARTFILE_SPEC \ "%{!shared: \ %{mabi=32:%{pg:gcrt1.o%s} \ %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ @@ -421,7 +422,7 @@ while (0) %{!p:/usr/lib32/mips3/crt1.o%s}}}}}" #undef STARTFILE_SPEC -#define STARTFILE_SPEC "%(irix6_startfile_spec) crtbegin.o%s" +#define STARTFILE_SPEC "%(irix_startfile_spec) crtbegin.o%s" #undef LIB_SPEC #define LIB_SPEC \ @@ -440,7 +441,8 @@ while (0) /* ??? If no mabi=X option give, but a mipsX option is, then should depend on the mipsX option. */ -#define IRIX6_ENDFILE_SPEC \ +#undef IRIX_ENDFILE_SPEC +#define IRIX_ENDFILE_SPEC \ "%{!shared: \ %{mabi=32:crtn.o%s}\ %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\ @@ -451,7 +453,7 @@ while (0) %{!mips4:/usr/lib32/mips3/crtn.o%s}}}" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s %(irix6_endfile_spec)" +#define ENDFILE_SPEC "crtend.o%s %(irix_endfile_spec)" /* ??? If no mabi=X option give, but a mipsX option is, then should depend on the mipsX option. */ @@ -476,8 +478,3 @@ do { \ } while (0) #define MIPS_TFMODE_FORMAT mips_extended_format - -#undef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS \ - { "irix6_startfile_spec", IRIX6_STARTFILE_SPEC }, \ - { "irix6_endfile_spec", IRIX6_ENDFILE_SPEC }, diff --git a/gcc/config/mips/iris6gld.h b/gcc/config/mips/iris6gld.h index 1e5ee2c9f96..c6e04e14cee 100644 --- a/gcc/config/mips/iris6gld.h +++ b/gcc/config/mips/iris6gld.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. Iris version 6 with GNU ld. - Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc. Written by Mark Mitchell . This file is part of GCC. @@ -48,10 +48,10 @@ Boston, MA 02111-1307, USA. */ %{mabi=32: -melf32bsmip}%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}%{!mabi*: -melf32bmipn32}" #undef STARTFILE_SPEC -#define STARTFILE_SPEC "%(irix6_startfile_spec) irix6-crti.o%s crtbegin.o%s" +#define STARTFILE_SPEC "%(irix_startfile_spec) irix-crti.o%s crtbegin.o%s" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s irix6-crtn.o%s %(irix6_endfile_spec)" +#define ENDFILE_SPEC "crtend.o%s irix-crtn.o%s %(irix_endfile_spec)" /* The GNU linker supports one-only sections. */ #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) diff --git a/gcc/config/mips/irix-crti.asm b/gcc/config/mips/irix-crti.asm new file mode 100644 index 00000000000..5d8ede70390 --- /dev/null +++ b/gcc/config/mips/irix-crti.asm @@ -0,0 +1,33 @@ + .abicalls + .set noreorder + .set nomacro + + .section .init,0x1,0x6,4,4 + jr $31 + nop + + .globl __gcc_init +__gcc_init: +#if _MIPS_SIM == _ABIO32 + addiu $sp,$sp,-16 + sw $31,0($sp) +#else + daddiu $sp,$sp,-16 + sd $31,0($sp) + sd $28,8($sp) +#endif + + .section .fini,0x1,0x6,4,4 + jr $31 + nop + + .globl __gcc_fini +__gcc_fini: +#if _MIPS_SIM == _ABIO32 + addiu $sp,$sp,-16 + sw $31,0($sp) +#else + daddiu $sp,$sp,-16 + sd $31,0($sp) + sd $28,8($sp) +#endif diff --git a/gcc/config/mips/irix-crtn.asm b/gcc/config/mips/irix-crtn.asm new file mode 100644 index 00000000000..647e8e13e31 --- /dev/null +++ b/gcc/config/mips/irix-crtn.asm @@ -0,0 +1,27 @@ + .abicalls + .set noreorder + .set nomacro + + .section .init,0x1,0x6,4,4 +#if _MIPS_SIM == _ABIO32 + lw $31,0($sp) + jr $31 + addiu $sp,$sp,16 +#else + ld $31,0($sp) + ld $28,8($sp) + jr $31 + daddiu $sp,$sp,16 +#endif + + .section .fini,0x1,0x6,4,4 +#if _MIPS_SIM == _ABIO32 + lw $31,0($sp) + jr $31 + addiu $sp,$sp,16 +#else + ld $31,0($sp) + ld $28,8($sp) + jr $31 + daddiu $sp,$sp,16 +#endif diff --git a/gcc/config/mips/irix6-crti.asm b/gcc/config/mips/irix6-crti.asm deleted file mode 100644 index 5d8ede70390..00000000000 --- a/gcc/config/mips/irix6-crti.asm +++ /dev/null @@ -1,33 +0,0 @@ - .abicalls - .set noreorder - .set nomacro - - .section .init,0x1,0x6,4,4 - jr $31 - nop - - .globl __gcc_init -__gcc_init: -#if _MIPS_SIM == _ABIO32 - addiu $sp,$sp,-16 - sw $31,0($sp) -#else - daddiu $sp,$sp,-16 - sd $31,0($sp) - sd $28,8($sp) -#endif - - .section .fini,0x1,0x6,4,4 - jr $31 - nop - - .globl __gcc_fini -__gcc_fini: -#if _MIPS_SIM == _ABIO32 - addiu $sp,$sp,-16 - sw $31,0($sp) -#else - daddiu $sp,$sp,-16 - sd $31,0($sp) - sd $28,8($sp) -#endif diff --git a/gcc/config/mips/irix6-crtn.asm b/gcc/config/mips/irix6-crtn.asm deleted file mode 100644 index 647e8e13e31..00000000000 --- a/gcc/config/mips/irix6-crtn.asm +++ /dev/null @@ -1,27 +0,0 @@ - .abicalls - .set noreorder - .set nomacro - - .section .init,0x1,0x6,4,4 -#if _MIPS_SIM == _ABIO32 - lw $31,0($sp) - jr $31 - addiu $sp,$sp,16 -#else - ld $31,0($sp) - ld $28,8($sp) - jr $31 - daddiu $sp,$sp,16 -#endif - - .section .fini,0x1,0x6,4,4 -#if _MIPS_SIM == _ABIO32 - lw $31,0($sp) - jr $31 - addiu $sp,$sp,16 -#else - ld $31,0($sp) - ld $28,8($sp) - jr $31 - daddiu $sp,$sp,16 -#endif diff --git a/gcc/config/mips/t-iris6gld b/gcc/config/mips/t-iris6gld deleted file mode 100644 index 2926be0cb44..00000000000 --- a/gcc/config/mips/t-iris6gld +++ /dev/null @@ -1,9 +0,0 @@ -$(T)irix6-crti.o: $(srcdir)/config/mips/irix6-crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $@ -x assembler-with-cpp $< - -$(T)irix6-crtn.o: $(srcdir)/config/mips/irix6-crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $@ -x assembler-with-cpp $< - -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o irix6-crti.o irix6-crtn.o diff --git a/gcc/config/mips/t-irix-gld b/gcc/config/mips/t-irix-gld new file mode 100644 index 00000000000..1e7ceafaff9 --- /dev/null +++ b/gcc/config/mips/t-irix-gld @@ -0,0 +1,9 @@ +$(T)irix-crti.o: $(srcdir)/config/mips/irix-crti.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $@ -x assembler-with-cpp $< + +$(T)irix-crtn.o: $(srcdir)/config/mips/irix-crtn.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $@ -x assembler-with-cpp $< + +EXTRA_MULTILIB_PARTS += irix-crti.o irix-crtn.o