--- gcc/config/mips/iris5.h 2018/04/24 18:21:59 1.1.1.2 +++ gcc/config/mips/iris5.h 2018/04/24 18:29:37 1.1.1.3 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Iris version 5. - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,9 +15,12 @@ GNU General Public License for more deta 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ +#ifndef TARGET_DEFAULT #define TARGET_DEFAULT MASK_ABICALLS +#endif #define ABICALLS_ASM_OP ".option pic2" #include "mips/iris4.h" @@ -34,6 +37,9 @@ the Free Software Foundation, 675 Mass A options, but using this would require modifying how crtstuff works, and I will leave that for another time (or someone else). */ #define OBJECT_FORMAT_ELF +#define HAS_INIT_SECTION +#define LD_INIT_SWITCH "-init" +#define LD_FINI_SWITCH "-fini" /* Specify wchar_t types. */ #undef WCHAR_TYPE @@ -73,30 +79,41 @@ the Free Software Foundation, 675 Mass A %{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64} \ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mips3:-U__mips -D__mips=3}" +%{mips3:-U__mips -D__mips=3 -D__mips64} \ +%{mgp32:-U__mips64} %{mgp64:-D__mips64} \ +%{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ +%{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" #undef LINK_SPEC #define LINK_SPEC "\ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ %{bestGnum} %{shared} %{non_shared} \ %{call_shared} %{no_archive} %{exact_version} \ -%{!shared: %{!non_shared: \ - %{!call_shared: -call_shared -no_unresolved}}} \ +%{!shared:%{!non_shared:%{!call_shared: -call_shared -no_unresolved}}} \ -_SYSTYPE_SVR4" +/* We now support shared libraries. */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}" + #undef LIB_SPEC -#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" +#define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}" + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "%{!shared:crtn.o%s}" /* We do not want to run mips-tfile! */ #undef ASM_FINAL_SPEC /* The system header files are C++ aware. */ /* ??? Unfortunately, most but not all of the headers are C++ aware. - Specifically, curses.h is not, and libg++ won't build because of it - if this is defined. On the other hand, SGI has C++ packages with - header files in /usr/include, and they won't work unless this is - defined. We need some way to fix just those files that need fixing. */ -/* #define NO_IMPLICIT_EXTERN_C 1 */ + 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 /* We don't support debugging info for now. */ #undef DBX_DEBUGGING_INFO @@ -104,7 +121,8 @@ the Free Software Foundation, 675 Mass A #undef MIPS_DEBUGGING_INFO #undef MACHINE_TYPE -#define MACHINE_TYPE "SGI running IRIX 5.0" +#define MACHINE_TYPE "SGI running IRIX 5.x" +#undef NO_DOLLAR_IN_LABEL /* -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. */