Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / config / mips / iris6.h
blobff051255c9c6982e9d24d7adfa84bab93b0cda4f
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, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, 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*: -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 #undef MACHINE_TYPE
42 #define MACHINE_TYPE "SGI running IRIX 6.x"
44 #ifdef IRIX_USING_GNU_LD
45 #define IRIX_SUBTARGET_LINK_SPEC \
46 "%{mabi=32: -melf32bsmip}%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
47 #else
48 #define IRIX_SUBTARGET_LINK_SPEC \
49 "%{w} -_SYSTYPE_SVR4 -woff 131 \
50 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
51 #endif
53 /* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */
54 #undef STARTFILE_SPEC
55 #define STARTFILE_SPEC \
56 "%{!shared: \
57 %{mabi=32:%{pg:gcrt1.o%s} \
58 %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
59 %{mabi=n32: \
60 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
61 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
62 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
63 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
64 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
65 %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
66 %{mabi=64: \
67 %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
68 %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
69 %{!p:/usr/lib64/mips4/crt1.o}}} \
70 %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
71 %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
72 %{!p:/usr/lib64/mips3/crt1.o}}}}} \
73 irix-crti.o%s crtbegin.o%s"
75 #ifdef IRIX_USING_GNU_LD
76 #define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
77 #define SUBTARGET_WARN_UNUSED_SPEC ""
78 #else
79 #define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
80 #define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
81 #endif
83 #undef LIB_SPEC
84 #define LIB_SPEC \
85 "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
86 -L/usr/lib32} \
87 %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
88 -L/usr/lib64} \
89 %{!shared:" \
90 SUBTARGET_DONT_WARN_UNUSED_SPEC \
91 " %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
92 SUBTARGET_WARN_UNUSED_SPEC "}"
94 /* Avoid getting two warnings for libgcc.a everytime we link. */
95 #undef LIBGCC_SPEC
96 #define LIBGCC_SPEC \
97 SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC
99 #undef ENDFILE_SPEC
100 #define ENDFILE_SPEC \
101 "crtend.o%s irix-crtn.o%s \
102 %{!shared: \
103 %{mabi=32:crtn.o%s}\
104 %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
105 %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
106 %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
107 %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
109 #define MIPS_TFMODE_FORMAT mips_extended_format