OSDN Git Service

x
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / iris6.h
1 /* Definitions of target machine for GNU compiler.  Iris version 6.
2    Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 /* Default to -mabi=n32 and -mips3.  */
22 #define MIPS_ISA_DEFAULT 3
23 #define MIPS_ABI_DEFAULT ABI_N32
24 #define MULTILIB_DEFAULTS { "mabi=n32" }
25
26 #ifndef TARGET_DEFAULT
27 #define TARGET_DEFAULT MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT
28 #endif
29
30 #include "mips/iris5.h"
31 #include "mips/abi64.h"
32
33 /* For Irix 6, -mips3 implies TARGET_LONG64.  */
34 #undef TARGET_LONG64
35 #define TARGET_LONG64           (mips_abi == ABI_64)
36
37 /* We must pass -D_LONGLONG always, even when -ansi is used, because irix6
38    system header files require it.  This is OK, because gcc never warns
39    when long long is used in system header files.  Alternatively, we can
40    add support for the SGI builtin type __long_long.  */
41 #undef CPP_PREDEFINES
42 #define CPP_PREDEFINES \
43  "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \
44   -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
45   -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)"
46
47 #undef SUBTARGET_CPP_SIZE_SPEC
48 #define SUBTARGET_CPP_SIZE_SPEC "\
49 %{mabi=32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
50 %{mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
51 %{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
52 %{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}"
53
54 /* We must make -mips3 do what -mlong64 used to do.  */
55 /* ??? If no mipsX option given, but a mabi=X option is, then should set
56    _MIPS_ISA based on the mabi=X option.  */
57 /* ??? If no mabi=X option give, but a mipsX option is, then should set
58    _MIPS_SIM based on the mipsX option.  */
59 /* ??? Same for _MIPS_SZINT.  */
60 /* ??? Same for _MIPS_SZPTR.  */
61 /* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE.  */
62 #undef SUBTARGET_CPP_SPEC
63 #define SUBTARGET_CPP_SPEC "\
64 %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} \
65 %{mfp32: -D_MIPS_FPSET=16}%{!mfp32: -D_MIPS_FPSET=32} \
66 %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
67 %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
68 %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
69 %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \
70 %{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
71 %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \
72 %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
73 %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \
74 %{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
75 %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
76 %{mabi=32: -D_MIPS_SZLONG=32} \
77 %{mabi=n32: -D_MIPS_SZLONG=32} \
78 %{mabi=64: -D_MIPS_SZLONG=64} \
79 %{!mabi*: -D_MIPS_SZLONG=32} \
80 %{mabi=32: -D_MIPS_SZPTR=32} \
81 %{mabi=n32: -D_MIPS_SZPTR=32} \
82 %{mabi=64: -D_MIPS_SZPTR=64} \
83 %{!mabi*: -D_MIPS_SZPTR=32} \
84 %{!mips1:%{!mips2: -D_COMPILER_VERSION=601}}            \
85 %{!mips*: -U__mips -D__mips=3} \
86 %{mabi=32: -U__mips64} \
87 %{mabi=n32: -D__mips64} \
88 %{mabi=64: -D__mips64} \
89 %{!mabi*: -D__mips64}"
90
91 /* Irix 6 uses DWARF.  */
92 #define DWARF_DEBUGGING_INFO
93 #define DWARF_VERSION 2
94 #define MIPS_DEBUGGING_INFO
95 #undef PREFERRED_DEBUGGING_TYPE
96 #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
97
98 /* The size in bytes of a DWARF field indicating an offset or length
99    relative to a debug info section, specified to be 4 bytes in the DWARF-2
100    specification.  The SGI/MIPS ABI defines it to be the same as PTR_SIZE.  */
101 #define DWARF_OFFSET_SIZE PTR_SIZE
102
103 #undef MACHINE_TYPE
104 #define MACHINE_TYPE "SGI running IRIX 6.x"
105
106 /* The Irix 6.0.1 assembler doesn't like labels in the text section, so
107    just avoid emitting them.  */
108 #define ASM_IDENTIFY_GCC
109 #define ASM_IDENTIFY_LANGUAGE
110
111 /* Irix 5 stuff that we don't need for Irix 6.  */
112 /* ??? We do need this for the -mabi=32 switch though.  */
113 #undef ASM_OUTPUT_UNDEF_FUNCTION
114 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
115 #undef ASM_DECLARE_FUNCTION_SIZE
116
117 /* Stuff we need for Irix 6 that isn't in Irix 5.  */
118
119 /* The SGI assembler doesn't like labels before the .ent, so we must output
120    the .ent and function name here, which is the normal place for it.  */
121
122 #undef ASM_DECLARE_FUNCTION_NAME
123 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)                   \
124   do {                                                                  \
125     fputs ("\t.ent\t", STREAM);                                         \
126     assemble_name (STREAM, NAME);                                       \
127     fputs ("\n", STREAM);                                               \
128     assemble_name (STREAM, NAME);                                       \
129     fputs (":\n", STREAM);                                              \
130   } while (0)
131
132 /* Likewise, the SGI assembler doesn't like labels after the .end, so we
133    must output the .end here.  */
134 #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)                   \
135   do {                                                                  \
136     fputs ("\t.end\t", STREAM);                                         \
137     assemble_name (STREAM, NAME);                                       \
138     fputs ("\n", STREAM);                                               \
139   } while (0)
140
141 /* Tell function_prologue in mips.c that we have already output the .ent/.end
142    psuedo-ops.  */
143 #define FUNCTION_NAME_ALREADY_DECLARED
144
145 #undef SET_ASM_OP       /* Has no equivalent.  See ASM_OUTPUT_DEF below.  */
146
147 #if 0
148 /* This is *NOT* how to equate one symbol to another symbol.  The assembler
149    '=' syntax just equates a name to a constant expression.
150    See ASM_OUTPUT_WEAK_ALIAS.  */
151
152 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                              \
153  do {   fprintf ((FILE), "\t");                                         \
154         assemble_name (FILE, LABEL1);                                   \
155         fprintf (FILE, " = ");                                          \
156         assemble_name (FILE, LABEL2);                                   \
157         fprintf (FILE, "\n");                                           \
158   } while (0)
159 #endif
160
161 /* Define the strings used for the special svr4 .type and .size directives.  */
162
163 #define TYPE_ASM_OP     ".type"
164 #define SIZE_ASM_OP     ".size"
165
166 /* This is how we tell the assembler that a symbol is weak.  */
167
168 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE)  \
169  do {                                           \
170   fputs ("\t.weakext\t", FILE);                 \
171   assemble_name (FILE, NAME);                   \
172   if (VALUE)                                    \
173     {                                           \
174       fputc (' ', FILE);                        \
175       assemble_name (FILE, VALUE);              \
176     }                                           \
177   fputc ('\n', FILE);                           \
178  } while (0)
179
180 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
181
182 #define POPSECTION_ASM_OP       ".popsection"
183
184 #define DEBUG_SECTION           ".debug_info,0x7000001e,0,0,1"
185 #define LINE_SECTION            ".debug_line,0x7000001e,0,0,1"
186 #define SFNAMES_SECTION         ".debug_sfnames,0x7000001e,0,0,1"
187 #define SRCINFO_SECTION         ".debug_srcinfo,0x7000001e,0,0,1"
188 #define MACINFO_SECTION         ".debug_macinfo,0x7000001e,0,0,1"
189 #define PUBNAMES_SECTION        ".debug_pubnames,0x7000001e,0,0,1"
190 #define ARANGES_SECTION         ".debug_aranges,0x7000001e,0,0,1"
191 #define FRAME_SECTION           ".debug_frame,0x7000001e,0x08000000,0,1"
192 #define ABBREV_SECTION          ".debug_abbrev,0x7000001e,0,0,1"
193
194 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
195    on the mipsX option.  */
196 #undef SUBTARGET_ASM_SPEC
197 #define SUBTARGET_ASM_SPEC "%{!mabi*:-n32}"
198
199 /* Must pass -g0 to the assembler, otherwise it may overwrite our
200    debug info with its own debug info. */
201 /* Must pass -show instead of -v.  */
202 /* Must pass -G 0 to the assembler, otherwise we may get warnings about
203    GOT overflow.  */
204 /* ??? We pass -w to disable all assembler warnings.  The `label should be
205    inside .ent/.end block' warning that we get for DWARF II debug info labels
206    is particularly annoying.  */
207 #undef SUBTARGET_MIPS_AS_ASM_SPEC
208 #define SUBTARGET_MIPS_AS_ASM_SPEC "%{v:-show} -G 0 -w"
209
210 #undef SUBTARGET_ASM_DEBUGGING_SPEC
211 #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
212
213 /* Stuff for constructors.  Start here.  */
214
215 /* The assembler now accepts .section pseudo-ops, but it does not allow
216    one to change the section in the middle of a function, so we can't use
217    the INIT_SECTION_ASM_OP code in crtstuff.  But we can build up the ctor
218    and dtor lists this way, so we use -init and -fini to invoke the
219    do_global_* functions instead of running collect2.  */
220
221 #define BSS_SECTION_ASM_OP      ".section\t.bss"
222 #define CONST_SECTION_ASM_OP_32 "\t.rdata"
223 #define CONST_SECTION_ASM_OP_64 ".section\t.rodata"
224 #define CTORS_SECTION_ASM_OP    ".section\t.ctors,1,2,0,4"
225 #define DTORS_SECTION_ASM_OP    ".section\t.dtors,1,2,0,4"
226
227 /* This is the pseudo-op used to generate a 32-bit word of data with a
228    specific value in some section.  This is the same for all known svr4
229    assemblers.  */
230
231 #define INT_ASM_OP              ".word"
232
233 /* A default list of other sections which we might be "in" at any given
234    time.  For targets that use additional sections (e.g. .tdesc) you
235    should override this definition in the target-specific file which
236    includes this file.  */
237
238 #undef EXTRA_SECTIONS
239 #define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors
240
241 /* A default list of extra section function definitions.  For targets
242    that use additional sections (e.g. .tdesc) you should override this
243    definition in the target-specific file which includes this file.  */
244
245 /* ??? rdata_section is now same as svr4 const_section.  */
246
247 #undef EXTRA_SECTION_FUNCTIONS
248 #define EXTRA_SECTION_FUNCTIONS                                         \
249 void                                                                    \
250 sdata_section ()                                                        \
251 {                                                                       \
252   if (in_section != in_sdata)                                           \
253     {                                                                   \
254       fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);             \
255       in_section = in_sdata;                                            \
256     }                                                                   \
257 }                                                                       \
258                                                                         \
259 void                                                                    \
260 rdata_section ()                                                        \
261 {                                                                       \
262   if (in_section != in_rdata)                                           \
263     {                                                                   \
264       if (mips_abi != ABI_32)                                           \
265         fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64);        \
266       else                                                              \
267         fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32);        \
268       in_section = in_rdata;                                            \
269     }                                                                   \
270 }                                                                       \
271   CTORS_SECTION_FUNCTION                                                \
272   DTORS_SECTION_FUNCTION
273
274 #define CTORS_SECTION_FUNCTION                                          \
275 void                                                                    \
276 ctors_section ()                                                        \
277 {                                                                       \
278   if (in_section != in_ctors)                                           \
279     {                                                                   \
280       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);             \
281       in_section = in_ctors;                                            \
282     }                                                                   \
283 }
284
285 #define DTORS_SECTION_FUNCTION                                          \
286 void                                                                    \
287 dtors_section ()                                                        \
288 {                                                                       \
289   if (in_section != in_dtors)                                           \
290     {                                                                   \
291       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);             \
292       in_section = in_dtors;                                            \
293     }                                                                   \
294 }
295
296 /* A C statement (sans semicolon) to output an element in the table of
297    global constructors.  */
298 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
299   do {                                                                  \
300     ctors_section ();                                                   \
301     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
302     assemble_name (FILE, NAME);                                         \
303     fprintf (FILE, "\n");                                               \
304   } while (0)
305
306 /* A C statement (sans semicolon) to output an element in the table of
307    global destructors.  */
308 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
309   do {                                                                  \
310     dtors_section ();                                                   \
311     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
312     assemble_name (FILE, NAME);                                         \
313     fprintf (FILE, "\n");                                               \
314   } while (0)
315
316 /* A C statement to output something to the assembler file to switch to section
317    NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
318    NULL_TREE.  */
319
320 #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME)                          \
321 do {                                                                    \
322   extern FILE *asm_out_text_file;                                       \
323   if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL)                      \
324     fprintf (asm_out_text_file, "\t.section %s,1,6,4,4\n", (NAME));     \
325   else if ((DECL) && TREE_READONLY (DECL))                              \
326     fprintf (F, "\t.section %s,1,2,0,8\n", (NAME));                     \
327   else                                                                  \
328     fprintf (F, "\t.section %s,1,3,0,8\n", (NAME));                     \
329 } while (0)
330
331 /* Stuff for constructors.  End here.  */
332
333 /* ??? Perhaps just include svr4.h in this file?  */
334
335 /* ??? SGI assembler may core dump when compiling with -g.
336    Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc)
337    Getting rid of .file solves both problems.  */
338 #undef ASM_OUTPUT_FILENAME
339 #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
340 do                                                              \
341   {                                                             \
342     fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES);    \
343     output_quoted_string (STREAM, NAME);                        \
344     fputs ("\n", STREAM);                                       \
345   }                                                             \
346 while (0)
347
348 /* ??? SGI assembler gives warning whenever .lcomm is used.  */
349 #undef ASM_OUTPUT_LOCAL
350 #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN)                \
351 do                                                                         \
352   {                                                                        \
353     if (mips_abi != ABI_32)                                                \
354       {                                                                    \
355         fprintf (STREAM, "%s\n", BSS_SECTION_ASM_OP);                      \
356         mips_declare_object (STREAM, NAME, "", ":\n", 0);                  \
357         ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT));     \
358         ASM_OUTPUT_SKIP (STREAM, SIZE);                                    \
359         fprintf (STREAM, "\t%s\n", POPSECTION_ASM_OP);                     \
360       }                                                                    \
361     else                                                                   \
362       mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \
363   }                                                                        \
364 while (0)
365
366 /* A C statement (sans semicolon) to output to the stdio stream
367    FILE the assembler definition of uninitialized global DECL named
368    NAME whose size is SIZE bytes and alignment is ALIGN bytes.
369    Try to use asm_output_aligned_bss to implement this macro.  */
370
371 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
372   asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
373
374 /* Write the extra assembler code needed to declare an object properly.  */
375
376 #undef ASM_DECLARE_OBJECT_NAME
377 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL)                     \
378 do                                                                      \
379  {                                                                      \
380    size_directive_output = 0;                                           \
381    if (!flag_inhibit_size_directive && DECL_SIZE (DECL))        \
382      {                                                                  \
383        size_directive_output = 1;                                       \
384        fprintf (STREAM, "\t%s\t ", SIZE_ASM_OP);                        \
385        assemble_name (STREAM, NAME);                                    \
386        fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
387      }                                                                  \
388    mips_declare_object (STREAM, NAME, "", ":\n", 0);                    \
389  }                                                                      \
390 while (0)
391
392 /* Output the size directive for a decl in rest_of_decl_compilation
393    in the case where we did not do so before the initializer.
394    Once we find the error_mark_node, we know that the value of
395    size_directive_output was set
396    by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
397
398 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)         \
399 do {                                                                     \
400      char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);                   \
401      if (!flag_inhibit_size_directive && DECL_SIZE (DECL)                \
402          && ! AT_END && TOP_LEVEL                                        \
403          && DECL_INITIAL (DECL) == error_mark_node                       \
404          && !size_directive_output)                                      \
405        {                                                                 \
406          size_directive_output = 1;                                      \
407          fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                         \
408          assemble_name (FILE, name);                                     \
409          fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
410        }                                                                 \
411    } while (0)
412
413 #undef LOCAL_LABEL_PREFIX
414 #define LOCAL_LABEL_PREFIX (mips_abi == ABI_32 ? "$" : ".")
415
416 /* Profiling is supported via libprof1.a not -lc_p as in Irix 3.  */
417 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
418    on the mipsX option.  */
419 #undef STARTFILE_SPEC
420 #define STARTFILE_SPEC \
421   "%{!shared: \
422      %{mabi=32:%{pg:gcrt1.o%s} \
423        %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
424      %{mabi=n32: \
425        %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
426          %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
427            %{!p:/usr/lib32/mips4/crt1.o%s}}} \
428        %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
429          %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
430            %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
431      %{mabi=64: \
432        %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
433          %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
434            %{!p:/usr/lib64/mips4/crt1.o}}} \
435        %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
436          %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
437            %{!p:/usr/lib64/mips3/crt1.o}}}} \
438      %{!mabi*: \
439        %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
440          %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
441            %{!p:/usr/lib32/mips4/crt1.o%s}}} \
442        %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
443          %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
444            %{!p:/usr/lib32/mips3/crt1.o%s}}}}} \
445    %{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
446      -L/usr/lib32} \
447    %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
448      -L/usr/lib64} \
449    %{!mabi*: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
450      -L/usr/lib32} \
451    crtbegin.o%s"
452
453 #undef LIB_SPEC
454 #define LIB_SPEC "\
455 %{!shared: \
456   -dont_warn_unused %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc -warn_unused}"
457
458 /* Avoid getting two warnings for libgcc.a everytime we link.  */
459 #undef LIBGCC_SPEC
460 #define LIBGCC_SPEC "-dont_warn_unused -lgcc -warn_unused"
461
462 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
463    on the mipsX option.  */
464 #undef ENDFILE_SPEC
465 #define ENDFILE_SPEC \
466   "crtend.o%s \
467    %{!shared: \
468      %{mabi=32:crtn.o%s}\
469      %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
470        %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
471      %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
472        %{!mips4:/usr/lib64/mips3/crtn.o%s}}\
473      %{!mabi*:%{mips4:/usr/lib32/mips4/crtn.o%s}\
474        %{!mips4:/usr/lib32/mips3/crtn.o%s}}}"
475
476 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
477    on the mipsX option.  */
478 #undef LINK_SPEC
479 #define LINK_SPEC "\
480 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
481 %{bestGnum} %{shared} %{non_shared} \
482 %{call_shared} %{no_archive} %{exact_version} \
483 %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \
484 %{rpath} -init __do_global_ctors -fini __do_global_dtors \
485 %{shared:-hidden_symbol __do_global_ctors,__do_global_dtors} \
486 -_SYSTYPE_SVR4 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64} %{!mabi*: -n32}"