-/* Definitions of target machine for GNU compiler. Iris version 5.
- Copyright (C) 1993 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler. IRIX version 5.
+ Copyright (C) 1993, 1995, 1996, 1998, 2000,
+ 2001, 2002, 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+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 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+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 GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#define TARGET_DEFAULT MASK_ABICALLS
-#define ABICALLS_ASM_OP ".option pic2"
-
-#define OBJECT_FORMAT_ELF
-
-#include "mips/iris4.h"
-
-/* Specify size_t, ptrdiff_t, and wchar_t types. */
-#undef SIZE_TYPE
-#undef PTRDIFF_TYPE
-#undef WCHAR_TYPE
-#undef WCHAR_TYPE_SIZE
-
-#define SIZE_TYPE "unsigned int"
-#define PTRDIFF_TYPE "int"
-#define WCHAR_TYPE "long int"
-#define WCHAR_TYPE_SIZE LONG_TYPE_SIZE
-
-/* ??? _MIPS_SIM and _MIPS_SZPTR should eventually depend on options when
- options for them exist. */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES \
- "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -DSYSTYPE_SVR4 \
- -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
- -D_MIPS_SIM=_MIPS_SIM_ABI32 -D_MIPS_SZPTR=32 \
- -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)"
-
-#undef CPP_SPEC
-#define CPP_SPEC "\
-%{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \
-%{.S: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
-%{.cc: -D_LANGUAGE_C_PLUS_PLUS} \
-%{.cxx: -D_LANGUAGE_C_PLUS_PLUS} \
-%{.C: -D_LANGUAGE_C_PLUS_PLUS} \
-%{.m: -D_LANGUAGE_OBJECTIVE_C} \
-%{!.S: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}\
-%{!mfp64: -D_MIPS_FPSET=16}%{mfp64: -D_MIPS_FPSET=32} \
-%{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
-%{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
-%{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
-%{!mips1: %{!mips2: %{!mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS1}}} \
-%{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
-%{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64}"
-
-#undef LINK_SPEC
-#define LINK_SPEC "\
-%{G*} \
-%{!mgas: \
- %{mips1} %{mips2} %{mips3} %{bestGnum} \
- %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \
- %{!shared: %{!non_shared: \
- %{!call_shared: -call_shared -no_unresolved}}} \
- -_SYSTYPE_SVR4 }"
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifdef IRIX_USING_GNU_LD
+#define IRIX_SUBTARGET_LINK_SPEC "-melf32bsmip"
+#else
+#define IRIX_SUBTARGET_LINK_SPEC "-_SYSTYPE_SVR4"
+#endif
+
+#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}}} \
+irix-crti.o%s crtbegin.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}"
-/* We do not want to run mips-tfile! */
-#undef ASM_FINAL_SPEC
+/* Avoid getting two warnings for libgcc.a everytime we link. */
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC \
+ SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC
-#undef OBJECT_FORMAT_COFF
-
-/* We don't support debugging info for now. */
-#undef DBX_DEBUGGING_INFO
-#undef SDB_DEBUGGING_INFO
-#undef MIPS_DEBUGGING_INFO
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s irix-crtn.o%s %{!shared:crtn.o%s}"
#undef MACHINE_TYPE
-#define MACHINE_TYPE "SGI running IRIX 5.0"
-
+#define MACHINE_TYPE "SGI running IRIX 5.x"