From: Rainer Orth Date: Fri, 3 Jun 2011 17:16:44 +0000 (+0000) Subject: config.gcc (mips-sgi-irix6.5*): Set tmake_file to mips/t-irix6 t-slibgcc-dummy. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=737346fa2420aaa838ad95995d9007f1599ff18b;p=gcc.git config.gcc (mips-sgi-irix6.5*): Set tmake_file to mips/t-irix6 t-slibgcc-dummy. gcc: * config.gcc (mips-sgi-irix6.5*): Set tmake_file to mips/t-irix6 t-slibgcc-dummy. * config/mips/irix-crti.asm: Move to ../libgcc/config/mips/irix-crti.S. * config/mips/irix-crtn.asm: Move to ../libgcc/config/mips/irix-crtn.S. * config/mips/t-iris: Remove. * config/mips/t-irix6: New file. * config/mips/t-slibgcc-irix: Move to ../libgcc/config/mips. libgcc: * config.host (mips-sgi-irix[56]*): Restrict to mips-sgi-irix6.5*. Set tmake_file, extra_parts. * config/mips/irix-crti.S: Move from ../gcc/config/mips/irix-crti.asm. Remove O32 support. * config/mips/irix-crtn.S: Move from ../gcc/config/mips/irix-crtn.asm. Remove O32 support. * config/mips/t-irix6: New file. * config/mips/t-slibgcc-irix: New file. From-SVN: r174608 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2cc42440a6a..05c1dd0ced6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-06-03 Rainer Orth + + * config.gcc (mips-sgi-irix6.5*): Set tmake_file to mips/t-irix6 + t-slibgcc-dummy. + * config/mips/irix-crti.asm: Move to ../libgcc/config/mips/irix-crti.S. + * config/mips/irix-crtn.asm: Move to ../libgcc/config/mips/irix-crtn.S. + * config/mips/t-iris: Remove. + * config/mips/t-irix6: New file. + * config/mips/t-slibgcc-irix: Move to ../libgcc/config/mips. + 2011-06-03 Rainer Orth * Makefile.in (LIB2ADDEHDEP): Remove. diff --git a/gcc/config.gcc b/gcc/config.gcc index b5d16444604..624129bf424 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1778,7 +1778,7 @@ microblaze*-*-*) ;; 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" + tmake_file="mips/t-irix6 t-slibgcc-dummy" extra_options="${extra_options} rpath.opt mips/iris6.opt" target_cpu_default="MASK_ABICALLS" tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" diff --git a/gcc/config/mips/irix-crti.asm b/gcc/config/mips/irix-crti.asm deleted file mode 100644 index 0e52e61941a..00000000000 --- a/gcc/config/mips/irix-crti.asm +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2004, 2008 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - - .abicalls - .set noreorder - .set nomacro - -/* The GNU and SGI linkers differ in their implementation of -init and -fini. - With the GNU linker, there can only be a single -init option, and the - linker simply sets DT_INIT to that value. gcc's initialization and - finalization code can go directly in .init, with the prologue and - epilogue of the main initialization routine being provided by external - object files (*crti.o and *crtn.o in this case). - - The SGI linker instead accepts several -init options. It will set DT_INIT - to a linker-created function (placed in .init) that calls each of the -init - functions in turn. If there is any user code in .init, this linker-created - function will be placed after it. Note that such user code is not treated - specially; it will only be called if the -init options arrange for it to - be called. - - In theory, the SGI model should allow the crti, crtn and intermediate code - to go in .init, just like it can with the GNU linker. However, doing this - seems to confuse the linker and triggers an internal error: - - ld32: FATAL 2 : Internal: at ../../ld/mips_code.c mips_code_fixup() - text section overflow! - - (seen with MIPSpro 7.30). We therefore put everything in a special - .gcc_init section instead. */ - - .section .gcc_init,"ax",@progbits - .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 .gcc_fini,"ax",@progbits - .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 - -/* This object will typically be included in the final link for both - shared libraries and executable, and we need to hide the symbols to - prevent possible symbol preemption warnings from the SGI linker. */ -.hidden __gcc_init -.hidden __gcc_fini - diff --git a/gcc/config/mips/irix-crtn.asm b/gcc/config/mips/irix-crtn.asm deleted file mode 100644 index 7c28c6ff467..00000000000 --- a/gcc/config/mips/irix-crtn.asm +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - - .abicalls - .set noreorder - .set nomacro - - .section .gcc_init,"ax",@progbits -#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 .gcc_fini,"ax",@progbits -#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-iris b/gcc/config/mips/t-iris deleted file mode 100644 index a200cf8c19c..00000000000 --- a/gcc/config/mips/t-iris +++ /dev/null @@ -1,9 +0,0 @@ -$(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 = crtbegin.o crtend.o irix-crti.o irix-crtn.o diff --git a/gcc/config/mips/t-iris6 b/gcc/config/mips/t-iris6 deleted file mode 100644 index 49f16d7fc10..00000000000 --- a/gcc/config/mips/t-iris6 +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, -# 2006, 2010 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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 3, or (at your option) -# any later version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# . - -MULTILIB_OPTIONS=mabi=n32/mabi=64 -MULTILIB_DIRNAMES=n32 64 -MULTILIB_MATCHES= -MULTILIB_OSDIRNAMES=../lib32 ../lib64 - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib - -TPBIT = tp-bit.c - -tp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > tp-bit.c - echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c - echo '#endif' >> tp-bit.c - echo '#define QUIET_NAN_NEGATED' >> tp-bit.c - echo '#if __LDBL_MANT_DIG__ == 106' >> tp-bit.c - echo '# define TFLOAT' >> tp-bit.c - cat $(srcdir)/config/fp-bit.c >> tp-bit.c - echo '#endif' >> tp-bit.c diff --git a/gcc/config/mips/t-irix6 b/gcc/config/mips/t-irix6 new file mode 100644 index 00000000000..6c76a4ad971 --- /dev/null +++ b/gcc/config/mips/t-irix6 @@ -0,0 +1,4 @@ +MULTILIB_OPTIONS=mabi=n32/mabi=64 +MULTILIB_DIRNAMES=n32 64 +MULTILIB_MATCHES= +MULTILIB_OSDIRNAMES=../lib32 ../lib64 diff --git a/gcc/config/mips/t-slibgcc-irix b/gcc/config/mips/t-slibgcc-irix deleted file mode 100644 index e9f168e49d2..00000000000 --- a/gcc/config/mips/t-slibgcc-irix +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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 3, or (at your option) -# any later version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# . - -# Build a shared libgcc library. - -SHLIB_EXT = .so -SHLIB_SOLINK = @shlib_base_name@.so -SHLIB_SOVERSION = 1 -SHLIB_SONAME = @shlib_base_name@.so.$(SHLIB_SOVERSION) -SHLIB_MAP = @shlib_map_file@ -SHLIB_OBJS = @shlib_objs@ -SHLIB_DIR = @multilib_dir@ -SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ -SHLIB_LC = -lc - -SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,-soname,$(SHLIB_SONAME) \ - -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ - $(SHLIB_OBJS) $(SHLIB_LC) && \ - rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ - if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \ - mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \ - $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \ - else true; fi && \ - mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \ - $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) -# $(slibdir) double quoted to protect it from expansion while building -# libgcc.mk. We want this delayed until actual install time. -SHLIB_INSTALL = \ - $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ - $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \ - rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ - $(LN_S) $(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) -SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MAPFILES = $$(libgcc_objdir)/libgcc-std.ver diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 9eb6e07cb70..4141890af33 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2011-06-03 Rainer Orth + + * config.host (mips-sgi-irix[56]*): Restrict to mips-sgi-irix6.5*. + Set tmake_file, extra_parts. + * config/mips/irix-crti.S: Move from ../gcc/config/mips/irix-crti.asm. + Remove O32 support. + * config/mips/irix-crtn.S: Move from ../gcc/config/mips/irix-crtn.asm. + Remove O32 support. + * config/mips/t-irix6: New file. + * config/mips/t-slibgcc-irix: New file. + 2011-06-03 Rainer Orth * config/s390/t-tpf (LIB2ADDEHDEP): Remove. diff --git a/libgcc/config.host b/libgcc/config.host index 3d92b44d3c6..fa16613835a 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -412,7 +412,9 @@ mcore-*-elf) microblaze*-*-*) tmake_file="microblaze/t-microblaze" ;; -mips-sgi-irix[56]*) +mips-sgi-irix6.5*) + tmake_file="mips/t-irix6 t-slibgcc mips/t-slibgcc-irix" + extra_parts="crtbegin.o crtend.o irix-crti.o irix-crtn.o" ;; mips*-*-netbsd*) # NetBSD/mips, either endian. ;; diff --git a/libgcc/config/mips/irix-crti.S b/libgcc/config/mips/irix-crti.S new file mode 100644 index 00000000000..b9fc1918f74 --- /dev/null +++ b/libgcc/config/mips/irix-crti.S @@ -0,0 +1,71 @@ +/* Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC 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 3, or (at your option) any later +version. + +GCC 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. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + + .abicalls + .set noreorder + .set nomacro + +/* The GNU and SGI linkers differ in their implementation of -init and -fini. + With the GNU linker, there can only be a single -init option, and the + linker simply sets DT_INIT to that value. gcc's initialization and + finalization code can go directly in .init, with the prologue and + epilogue of the main initialization routine being provided by external + object files (*crti.o and *crtn.o in this case). + + The SGI linker instead accepts several -init options. It will set DT_INIT + to a linker-created function (placed in .init) that calls each of the -init + functions in turn. If there is any user code in .init, this linker-created + function will be placed after it. Note that such user code is not treated + specially; it will only be called if the -init options arrange for it to + be called. + + In theory, the SGI model should allow the crti, crtn and intermediate code + to go in .init, just like it can with the GNU linker. However, doing this + seems to confuse the linker and triggers an internal error: + + ld32: FATAL 2 : Internal: at ../../ld/mips_code.c mips_code_fixup() + text section overflow! + + (seen with MIPSpro 7.30). We therefore put everything in a special + .gcc_init section instead. */ + + .section .gcc_init,"ax",@progbits + .globl __gcc_init +__gcc_init: + daddiu $sp,$sp,-16 + sd $31,0($sp) + sd $28,8($sp) + + .section .gcc_fini,"ax",@progbits + .globl __gcc_fini +__gcc_fini: + daddiu $sp,$sp,-16 + sd $31,0($sp) + sd $28,8($sp) + +/* This object will typically be included in the final link for both + shared libraries and executable, and we need to hide the symbols to + prevent possible symbol preemption warnings from the SGI linker. */ +.hidden __gcc_init +.hidden __gcc_fini + diff --git a/libgcc/config/mips/irix-crtn.S b/libgcc/config/mips/irix-crtn.S new file mode 100644 index 00000000000..8194cacf5d7 --- /dev/null +++ b/libgcc/config/mips/irix-crtn.S @@ -0,0 +1,38 @@ +/* Copyright (C) 2004, 2011 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC 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 3, or (at your option) any later +version. + +GCC 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. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + + .abicalls + .set noreorder + .set nomacro + + .section .gcc_init,"ax",@progbits + ld $31,0($sp) + ld $28,8($sp) + jr $31 + daddiu $sp,$sp,16 + + .section .gcc_fini,"ax",@progbits + ld $31,0($sp) + ld $28,8($sp) + jr $31 + daddiu $sp,$sp,16 diff --git a/libgcc/config/mips/t-irix6 b/libgcc/config/mips/t-irix6 new file mode 100644 index 00000000000..77dd41da276 --- /dev/null +++ b/libgcc/config/mips/t-irix6 @@ -0,0 +1,36 @@ +# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, +# 2006, 2010, 2011 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC 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 3, or (at your option) +# any later version. +# +# GCC 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 GCC; see the file COPYING3. If not see +# . + +irix-crti.o: $(srcdir)/config/mips/irix-crti.S + $(crt_compile) -c $< + +irix-crtn.o: $(srcdir)/config/mips/irix-crtn.S + $(crt_compile) -c $< + +TPBIT = tp-bit.c + +$(gcc_objdir)/tp-bit.c: $(gcc_srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > $@ + echo '# define FLOAT_BIT_ORDER_MISMATCH' >> $@ + echo '#endif' >> $@ + echo '#define QUIET_NAN_NEGATED' >> $@ + echo '#if __LDBL_MANT_DIG__ == 106' >> $@ + echo '# define TFLOAT' >> $@ + cat $< >> $@ + echo '#endif' >> $@ diff --git a/libgcc/config/mips/t-slibgcc-irix b/libgcc/config/mips/t-slibgcc-irix new file mode 100644 index 00000000000..6e0ac365437 --- /dev/null +++ b/libgcc/config/mips/t-slibgcc-irix @@ -0,0 +1,7 @@ +# Build a shared libgcc library with the SGI linker. + +SHLIB_LDFLAGS = -Wl,-soname,$(SHLIB_SONAME) \ + -Wl,-exports_file,$(SHLIB_MAP) + +SHLIB_MKMAP = $(gcc_srcdir)/mkmap-flat.awk +SHLIB_MAPFILES = libgcc-std.ver