Update FSF address.
[official-gcc.git] / gcc / config / mips / iris6.h
blob9e9e002733c899ca77c7a0a4f6c3aab119d737c8
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 2005
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* Allow some special handling for IRIX 6. */
24 #undef TARGET_IRIX6
25 #define TARGET_IRIX6 1
27 /* Default to -mabi=n32 and -mips3. */
28 #undef MULTILIB_DEFAULTS
29 #define MULTILIB_DEFAULTS { "mabi=n32" }
31 /* Force the default ABI onto the command line in order to make the specs
32 easier to write. Default to the mips2 ISA for the O32 ABI. */
33 #define DRIVER_SELF_SPECS \
34 "%{!mabi=*: -mabi=n32}", \
35 "%{mabi=32: %{!mips*: %{!march*: -mips2}}}"
37 /* Force the generation of dwarf .debug_frame sections even if not
38 compiling -g. This guarantees that we can unwind the stack. */
39 #define DWARF2_FRAME_INFO 1
41 /* The system unwinder in libexc requires a specific dwarf return address
42 column to work. */
43 #undef DWARF_FRAME_RETURN_COLUMN
44 #define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)
46 #undef MACHINE_TYPE
47 #define MACHINE_TYPE "SGI running IRIX 6.x"
49 #ifdef IRIX_USING_GNU_LD
50 #define IRIX_SUBTARGET_LINK_SPEC \
51 "%{mabi=32: -melf32bsmip}%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
52 #else
53 #define IRIX_SUBTARGET_LINK_SPEC \
54 "%{w} -_SYSTYPE_SVR4 -woff 131 \
55 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
56 #endif
58 /* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */
59 #undef STARTFILE_SPEC
60 #define STARTFILE_SPEC \
61 "%{!shared: \
62 %{mabi=32:%{pg:gcrt1.o%s} \
63 %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
64 %{mabi=n32: \
65 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
66 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
67 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
68 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
69 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
70 %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
71 %{mabi=64: \
72 %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
73 %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
74 %{!p:/usr/lib64/mips4/crt1.o}}} \
75 %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
76 %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
77 %{!p:/usr/lib64/mips3/crt1.o}}}}} \
78 irix-crti.o%s crtbegin.o%s"
80 #ifdef IRIX_USING_GNU_LD
81 #define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
82 #define SUBTARGET_WARN_UNUSED_SPEC ""
83 #else
84 #define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
85 #define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
86 #endif
88 #undef LIB_SPEC
89 #define LIB_SPEC \
90 "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
91 -L/usr/lib32} \
92 %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
93 -L/usr/lib64} \
94 %{!shared:" \
95 SUBTARGET_DONT_WARN_UNUSED_SPEC \
96 " %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
97 SUBTARGET_WARN_UNUSED_SPEC "}"
99 /* Avoid getting two warnings for libgcc.a everytime we link. */
100 #undef LIBGCC_SPEC
101 #define LIBGCC_SPEC \
102 SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC
104 #undef ENDFILE_SPEC
105 #define ENDFILE_SPEC \
106 "crtend.o%s irix-crtn.o%s \
107 %{!shared: \
108 %{mabi=32:crtn.o%s}\
109 %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
110 %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
111 %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
112 %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
114 #define MIPS_TFMODE_FORMAT mips_extended_format