1 /* Definitions of target machine for GNU compiler. IRIX version 6.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
3 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Allow some special handling for IRIX 6. */
24 #define TARGET_IRIX6 1
26 /* Default to -mabi=n32 and -mips3. */
27 #undef MULTILIB_DEFAULTS
28 #define MULTILIB_DEFAULTS { "mabi=n32" }
30 /* Force the default ABI onto the command line in order to make the specs
31 easier to write. Default to the mips2 ISA for the O32 ABI. */
32 #define DRIVER_SELF_SPECS \
33 "%{!mabi=*: -mabi=n32}", \
34 "%{mabi=32: %{!mips*: -mips2}}"
36 /* Force the generation of dwarf .debug_frame sections even if not
37 compiling -g. This guarantees that we can unwind the stack. */
38 #define DWARF2_FRAME_INFO 1
41 #define MACHINE_TYPE "SGI running IRIX 6.x"
43 #ifdef IRIX_USING_GNU_LD
44 #define IRIX_SUBTARGET_LINK_SPEC \
45 "%{mabi=32: -melf32bsmip}%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
47 #define IRIX_SUBTARGET_LINK_SPEC \
48 "%{w} -_SYSTYPE_SVR4 -woff 131 \
49 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
52 /* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */
54 #define STARTFILE_SPEC \
56 %{mabi=32:%{pg:gcrt1.o%s} \
57 %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
59 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
60 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
61 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
62 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
63 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
64 %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
66 %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
67 %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
68 %{!p:/usr/lib64/mips4/crt1.o}}} \
69 %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
70 %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
71 %{!p:/usr/lib64/mips3/crt1.o}}}}} \
72 irix-crti.o%s crtbegin.o%s"
74 #ifdef IRIX_USING_GNU_LD
75 #define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
76 #define SUBTARGET_WARN_UNUSED_SPEC ""
78 #define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
79 #define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
84 "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
86 %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
89 SUBTARGET_DONT_WARN_UNUSED_SPEC \
90 " %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
91 SUBTARGET_WARN_UNUSED_SPEC "}"
93 /* Avoid getting two warnings for libgcc.a everytime we link. */
96 SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC
99 #define ENDFILE_SPEC \
100 "crtend.o%s irix-crtn.o%s \
103 %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
104 %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
105 %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
106 %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
108 #define MIPS_TFMODE_FORMAT mips_extended_format