1 /* Definitions of target machine for GNU compiler. Iris version 6.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
4 This file is part of GNU CC.
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)
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.
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. */
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" }
26 #ifndef TARGET_DEFAULT
27 #define TARGET_DEFAULT (MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT)
30 #include "mips/iris5.h"
31 #include "mips/abi64.h"
33 /* Irix6 assembler does handle DWARF2 directives. Override setting in
35 #undef DWARF2_UNWIND_INFO
37 /* The Irix6 assembler will sometimes assign labels to the wrong
38 section unless the labels are within .ent/.end blocks. Therefore,
39 we avoid creating such labels. */
40 #define DWARF2_GENERATE_TEXT_SECTION_LABEL 0
42 /* For Irix 6, -mabi=64 implies TARGET_LONG64. */
43 /* This is handled in override_options. */
45 #undef SUBTARGET_CC1_SPEC
46 #define SUBTARGET_CC1_SPEC ""
48 /* We must pass -D_LONGLONG always, even when -ansi is used, because irix6
49 system header files require it. This is OK, because gcc never warns
50 when long long is used in system header files. Alternatively, we can
51 add support for the SGI builtin type __long_long. */
53 #define CPP_PREDEFINES \
54 "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \
55 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
56 -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=sgi"
58 #undef SUBTARGET_CPP_SIZE_SPEC
59 #define SUBTARGET_CPP_SIZE_SPEC "\
60 %{mabi=32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
61 %{mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
62 %{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
63 %{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}"
65 /* We must make -mips3 do what -mlong64 used to do. */
66 /* ??? If no mipsX option given, but a mabi=X option is, then should set
67 _MIPS_ISA based on the mabi=X option. */
68 /* ??? If no mabi=X option give, but a mipsX option is, then should set
69 _MIPS_SIM based on the mipsX option. */
70 /* ??? Same for _MIPS_SZINT. */
71 /* ??? Same for _MIPS_SZPTR. */
72 /* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */
73 #undef SUBTARGET_CPP_SPEC
74 #define SUBTARGET_CPP_SPEC "\
75 %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} \
76 %{mfp32: -D_MIPS_FPSET=16}%{!mfp32: -D_MIPS_FPSET=32} \
77 %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
78 %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
79 %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
80 %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \
81 %{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
82 %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \
83 %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
84 %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \
85 %{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
86 %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
87 %{mabi=32: -D_MIPS_SZLONG=32} \
88 %{mabi=n32: -D_MIPS_SZLONG=32} \
89 %{mabi=64: -D_MIPS_SZLONG=64} \
90 %{!mabi*: -D_MIPS_SZLONG=32} \
91 %{mabi=32: -D_MIPS_SZPTR=32} \
92 %{mabi=n32: -D_MIPS_SZPTR=32} \
93 %{mabi=64: -D_MIPS_SZPTR=64} \
94 %{!mabi*: -D_MIPS_SZPTR=32} \
95 %{!mips1:%{!mips2: -D_COMPILER_VERSION=601}} \
96 %{!mips*: -U__mips -D__mips=3} \
97 %{mabi=32: -U__mips64} \
98 %{mabi=n32: -D__mips64} \
99 %{mabi=64: -D__mips64} \
100 %{!mabi*: -D__mips64}"
102 /* Irix 6 uses DWARF-2. */
103 #define DWARF2_DEBUGGING_INFO
104 #define MIPS_DEBUGGING_INFO
105 #undef PREFERRED_DEBUGGING_TYPE
106 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
108 /* Force the generation of dwarf .debug_frame sections even if not
109 compiling -g. This guarantees that we can unwind the stack. */
110 #define DWARF2_FRAME_INFO 1
111 /* The size in bytes of a DWARF field indicating an offset or length
112 relative to a debug info section, specified to be 4 bytes in the DWARF-2
113 specification. The SGI/MIPS ABI defines it to be the same as PTR_SIZE. */
114 #define DWARF_OFFSET_SIZE PTR_SIZE
116 /* There is no GNU as port for Irix6 yet, so we set MD_EXEC_PREFIX so that
117 gcc will automatically find SGI as instead of searching the user's path.
118 The latter can fail when building a cross compiler if the user has . in
119 the path before /usr/bin, since then gcc will find and try to use the link
120 to the cross assembler which can't possibly work. */
122 #undef MD_EXEC_PREFIX
123 #define MD_EXEC_PREFIX "/usr/bin/"
125 /* We have no need for MD_STARTFILE_PREFIX. */
126 #undef MD_STARTFILE_PREFIX
129 #define MACHINE_TYPE "SGI running IRIX 6.x"
131 /* Irix 5 stuff that we don't need for Irix 6. */
132 /* ??? We do need this for the -mabi=32 switch though. */
133 #undef ASM_OUTPUT_UNDEF_FUNCTION
134 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
135 #undef ASM_DECLARE_FUNCTION_SIZE
137 /* Stuff we need for Irix 6 that isn't in Irix 5. */
139 /* The SGI assembler doesn't like labels before the .ent, so we must output
140 the .ent and function name here, which is the normal place for it. */
142 #undef ASM_DECLARE_FUNCTION_NAME
143 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
145 fputs ("\t.ent\t", STREAM); \
146 assemble_name (STREAM, NAME); \
147 fputs ("\n", STREAM); \
148 assemble_name (STREAM, NAME); \
149 fputs (":\n", STREAM); \
152 /* Likewise, the SGI assembler doesn't like labels after the .end, so we
153 must output the .end here. */
154 #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
156 fputs ("\t.end\t", STREAM); \
157 assemble_name (STREAM, NAME); \
158 fputs ("\n", STREAM); \
161 /* Tell function_prologue in mips.c that we have already output the .ent/.end
163 #define FUNCTION_NAME_ALREADY_DECLARED
165 #undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */
168 /* This is *NOT* how to equate one symbol to another symbol. The assembler
169 '=' syntax just equates a name to a constant expression.
170 See ASM_OUTPUT_WEAK_ALIAS. */
172 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
173 do { fprintf ((FILE), "\t"); \
174 assemble_name (FILE, LABEL1); \
175 fprintf (FILE, " = "); \
176 assemble_name (FILE, LABEL2); \
177 fprintf (FILE, "\n"); \
181 /* Define the strings used for the special svr4 .type and .size directives. */
183 #define TYPE_ASM_OP "\t.type\t"
184 #define SIZE_ASM_OP "\t.size\t"
186 /* This is how we tell the assembler that a symbol is weak. */
188 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
190 ASM_GLOBALIZE_LABEL (FILE, NAME); \
191 fputs ("\t.weakext\t", FILE); \
192 assemble_name (FILE, NAME); \
196 assemble_name (FILE, VALUE); \
198 fputc ('\n', FILE); \
201 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
203 /* Irix assembler does not support the init_priority C++ attribute. */
204 #undef SUPPORTS_INIT_PRIORITY
205 #define SUPPORTS_INIT_PRIORITY 0
207 /* A linker error can empirically be avoided by removing duplicate
208 library search directories. */
209 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1
211 #define POPSECTION_ASM_OP "\t.popsection"
213 #define DEBUG_INFO_SECTION ".debug_info,0x7000001e,0,0,1"
214 #define DEBUG_LINE_SECTION ".debug_line,0x7000001e,0,0,1"
215 #define DEBUG_SFNAMES_SECTION ".debug_sfnames,0x7000001e,0,0,1"
216 #define DEBUG_SRCINFO_SECTION ".debug_srcinfo,0x7000001e,0,0,1"
217 #define DEBUG_MACINFO_SECTION ".debug_macinfo,0x7000001e,0,0,1"
218 #define DEBUG_PUBNAMES_SECTION ".debug_pubnames,0x7000001e,0,0,1"
219 #define DEBUG_ARANGES_SECTION ".debug_aranges,0x7000001e,0,0,1"
220 #define DEBUG_FRAME_SECTION ".debug_frame,0x7000001e,0x08000000,0,1"
221 #define DEBUG_ABBREV_SECTION ".debug_abbrev,0x7000001e,0,0,1"
222 #define DEBUG_LOC_SECTION ".debug_loc,0x7000001e,0,0,1"
223 #define DEBUG_STR_SECTION ".debug_str,0x7000001e,0,0,1"
225 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
226 on the mipsX option. */
227 /* If no mips[3,4] option given, give the appropriate default for mabi=X */
228 #undef SUBTARGET_ASM_SPEC
229 #define SUBTARGET_ASM_SPEC "%{!mabi*:-n32} %{!mips*: %{!mabi*:-mips3} %{mabi=n32:-mips3} %{mabi=64:-mips4}}"
231 /* Must pass -g0 to the assembler, otherwise it may overwrite our
232 debug info with its own debug info. */
233 /* Must pass -show instead of -v. */
234 /* Must pass -G 0 to the assembler, otherwise we may get warnings about
236 /* ??? We pass -w to disable all assembler warnings. The `label should be
237 inside .ent/.end block' warning that we get for DWARF II debug info labels
238 is particularly annoying. */
239 #undef SUBTARGET_MIPS_AS_ASM_SPEC
240 #define SUBTARGET_MIPS_AS_ASM_SPEC "%{v:-show} -G 0 -w"
242 #undef SUBTARGET_ASM_DEBUGGING_SPEC
243 #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
245 /* The MIPS assembler occasionally misoptimizes. Since GCC should be
246 doing scheduling anyhow, just turn off optimization in the assembler. */
247 #undef SUBTARGET_ASM_OPTIMIZING_SPEC
248 #define SUBTARGET_ASM_OPTIMIZING_SPEC "-O0"
250 /* Stuff for constructors. Start here. */
252 /* The assembler now accepts .section pseudo-ops, but it does not allow
253 one to change the section in the middle of a function, so we can't use
254 the INIT_SECTION_ASM_OP code in crtstuff. But we can build up the ctor
255 and dtor lists this way, so we use -init and -fini to invoke the
256 do_global_* functions instead of running collect2. */
258 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
259 #define CONST_SECTION_ASM_OP_32 "\t.rdata"
260 #define CONST_SECTION_ASM_OP_64 "\t.section\t.rodata"
262 /* The IRIX 6 assembler .section directive takes four additional args:
263 section type, flags, entry size, and alignment. The alignment of the
264 .ctors and .dtors sections needs to be the same as the size of a pointer
265 so that the linker doesn't add padding between elements. */
266 #if defined (CRT_BEGIN) || defined (CRT_END)
268 /* If we are included from crtstuff.c, these need to be plain strings.
269 _MIPS_SZPTR is defined in SUBTARGET_CPP_SPEC above. */
270 #if _MIPS_SZPTR == 64
271 #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,1,2,0,8"
272 #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,1,2,0,8"
273 #define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,8"
274 #else /* _MIPS_SZPTR != 64 */
275 #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,1,2,0,4"
276 #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,1,2,0,4"
277 #define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,4"
279 #endif /* _MIPS_SZPTR == 64 */
281 #else /* ! (defined (CRT_BEGIN) || defined (CRT_END)) */
283 /* If we are included from varasm.c, these need to depend on -mabi. */
284 #define CTORS_SECTION_ASM_OP \
285 (Pmode == DImode ? "\t.section\t.ctors,1,2,0,8" : "\t.section\t.ctors,1,2,0,4")
286 #define DTORS_SECTION_ASM_OP \
287 (Pmode == DImode ? "\t.section\t.dtors,1,2,0,8" : "\t.section\t.dtors,1,2,0,4")
288 #define EH_FRAME_SECTION_ASM_OP \
289 (Pmode == DImode ? "\t.section\t.eh_frame,1,2,0,8" : "\t.section\t.eh_frame,1,2,0,4")
290 #endif /* defined (CRT_BEGIN) || defined (CRT_END) */
292 /* A default list of other sections which we might be "in" at any given
293 time. For targets that use additional sections (e.g. .tdesc) you
294 should override this definition in the target-specific file which
295 includes this file. */
297 #undef EXTRA_SECTIONS
298 #define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors
300 /* A default list of extra section function definitions. For targets
301 that use additional sections (e.g. .tdesc) you should override this
302 definition in the target-specific file which includes this file. */
304 /* ??? rdata_section is now same as svr4 const_section. */
306 #undef EXTRA_SECTION_FUNCTIONS
307 #define EXTRA_SECTION_FUNCTIONS \
311 if (in_section != in_sdata) \
313 fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
314 in_section = in_sdata; \
321 if (in_section != in_rdata) \
323 if (mips_abi != ABI_32 && mips_abi != ABI_O64) \
324 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \
326 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \
327 in_section = in_rdata; \
330 CTORS_SECTION_FUNCTION \
331 DTORS_SECTION_FUNCTION
333 #define CTORS_SECTION_FUNCTION \
337 if (in_section != in_ctors) \
339 fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
340 in_section = in_ctors; \
344 #define DTORS_SECTION_FUNCTION \
348 if (in_section != in_dtors) \
350 fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
351 in_section = in_dtors; \
355 /* A C statement (sans semicolon) to output an element in the table of
356 global constructors. */
357 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
360 fprintf (FILE, "\t%s\t ", \
361 (Pmode == DImode) ? ".dword" : ".word"); \
362 assemble_name (FILE, NAME); \
363 fprintf (FILE, "\n"); \
366 /* A C statement (sans semicolon) to output an element in the table of
367 global destructors. */
368 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
371 fprintf (FILE, "\t%s\t ", \
372 (Pmode == DImode) ? ".dword" : ".word"); \
373 assemble_name (FILE, NAME); \
374 fprintf (FILE, "\n"); \
377 /* A C statement to output something to the assembler file to switch to section
378 NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
381 #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \
383 extern FILE *asm_out_text_file; \
384 if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
385 fprintf (asm_out_text_file, "\t.section %s,1,6,4,4\n", (NAME)); \
386 else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
387 fprintf (F, "\t.section %s,1,2,0,8\n", (NAME)); \
388 else if (! strcmp (NAME, ".bss")) \
389 fprintf (F, "\t.section %s,\"aw\",@nobits\n", (NAME)); \
391 fprintf (F, "\t.section %s,1,3,0,8\n", (NAME)); \
394 /* Stuff for constructors. End here. */
396 /* ??? Perhaps just include svr4.h in this file? */
398 /* ??? SGI assembler may core dump when compiling with -g.
399 Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc)
400 Getting rid of .file solves both problems. */
401 #undef ASM_OUTPUT_FILENAME
402 #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
405 fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \
406 output_quoted_string (STREAM, NAME); \
407 fputs ("\n", STREAM); \
411 /* ??? SGI assembler gives warning whenever .lcomm is used. */
412 #undef ASM_OUTPUT_LOCAL
413 #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \
416 if (mips_abi != ABI_32 && mips_abi != ABI_O64) \
418 fprintf (STREAM, "%s\n", BSS_SECTION_ASM_OP); \
419 mips_declare_object (STREAM, NAME, "", ":\n", 0); \
420 ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
421 ASM_OUTPUT_SKIP (STREAM, SIZE); \
422 fprintf (STREAM, "%s\n", POPSECTION_ASM_OP); \
425 mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \
429 /* A C statement (sans semicolon) to output to the stdio stream
430 FILE the assembler definition of uninitialized global DECL named
431 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
432 Try to use asm_output_aligned_bss to implement this macro. */
434 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
435 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
437 /* Write the extra assembler code needed to declare an object properly. */
439 #undef ASM_DECLARE_OBJECT_NAME
440 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
443 size_directive_output = 0; \
444 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
446 size_directive_output = 1; \
447 fprintf (STREAM, "%s", SIZE_ASM_OP); \
448 assemble_name (STREAM, NAME); \
449 fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
451 mips_declare_object (STREAM, NAME, "", ":\n", 0); \
455 /* Define the `__builtin_va_list' type for the ABI. On Irix6, this
457 #undef BUILD_VA_LIST_TYPE
458 #define BUILD_VA_LIST_TYPE(VALIST) \
459 (VALIST) = build_pointer_type (char_type_node)
461 /* Output the size directive for a decl in rest_of_decl_compilation
462 in the case where we did not do so before the initializer.
463 Once we find the error_mark_node, we know that the value of
464 size_directive_output was set
465 by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
467 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
469 const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
470 if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
471 && ! AT_END && TOP_LEVEL \
472 && DECL_INITIAL (DECL) == error_mark_node \
473 && !size_directive_output) \
475 size_directive_output = 1; \
476 fprintf (FILE, "%s", SIZE_ASM_OP); \
477 assemble_name (FILE, name); \
478 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
482 #undef LOCAL_LABEL_PREFIX
483 #define LOCAL_LABEL_PREFIX ((mips_abi == ABI_32 || mips_abi == ABI_O64) \
486 /* Profiling is supported via libprof1.a not -lc_p as in Irix 3. */
487 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
488 on the mipsX option. */
489 #undef STARTFILE_SPEC
490 #define STARTFILE_SPEC \
492 %{mabi=32:%{pg:gcrt1.o%s} \
493 %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
495 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
496 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
497 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
498 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
499 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
500 %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
502 %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
503 %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
504 %{!p:/usr/lib64/mips4/crt1.o}}} \
505 %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
506 %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
507 %{!p:/usr/lib64/mips3/crt1.o}}}} \
509 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
510 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
511 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
512 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
513 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
514 %{!p:/usr/lib32/mips3/crt1.o%s}}}}} \
519 "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
521 %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
523 %{!mabi*: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
526 -dont_warn_unused %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc -warn_unused}"
528 /* Avoid getting two warnings for libgcc.a everytime we link. */
530 #define LIBGCC_SPEC "-dont_warn_unused -lgcc -warn_unused"
532 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
533 on the mipsX option. */
535 #define ENDFILE_SPEC \
539 %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
540 %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
541 %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
542 %{!mips4:/usr/lib64/mips3/crtn.o%s}}\
543 %{!mabi*:%{mips4:/usr/lib32/mips4/crtn.o%s}\
544 %{!mips4:/usr/lib32/mips3/crtn.o%s}}}"
546 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
547 on the mipsX option. */
550 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
551 %{bestGnum} %{shared} %{non_shared} \
552 %{call_shared} %{no_archive} %{exact_version} %{w} \
553 %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \
554 %{rpath} -init __do_global_ctors -fini __do_global_dtors \
555 %{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__,__frame_dummy} \
556 -_SYSTYPE_SVR4 -woff 131 \
557 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"