import of gcc-2.8
[official-gcc.git] / gcc / config / mips / iris6.h
blob5bc733cb42762ff76770bce2754541441ec8c4ae
1 /* Definitions of target machine for GNU compiler. Iris version 6.
2 Copyright (C) 1994, 1995, 1996, 1997 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)
9 any later version.
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
28 #endif
30 #include "mips/iris5.h"
31 #include "mips/abi64.h"
33 /* For Irix 6, -mabi=64 implies TARGET_LONG64. */
34 /* This is handled in override_options. */
36 #undef SUBTARGET_CC1_SPEC
37 #define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
39 /* We must pass -D_LONGLONG always, even when -ansi is used, because irix6
40 system header files require it. This is OK, because gcc never warns
41 when long long is used in system header files. Alternatively, we can
42 add support for the SGI builtin type __long_long. */
43 #undef CPP_PREDEFINES
44 #define CPP_PREDEFINES \
45 "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \
46 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
47 -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)"
49 #undef SUBTARGET_CPP_SIZE_SPEC
50 #define SUBTARGET_CPP_SIZE_SPEC "\
51 %{mabi=32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
52 %{mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
53 %{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
54 %{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}"
56 /* We must make -mips3 do what -mlong64 used to do. */
57 /* ??? If no mipsX option given, but a mabi=X option is, then should set
58 _MIPS_ISA based on the mabi=X option. */
59 /* ??? If no mabi=X option give, but a mipsX option is, then should set
60 _MIPS_SIM based on the mipsX option. */
61 /* ??? Same for _MIPS_SZINT. */
62 /* ??? Same for _MIPS_SZPTR. */
63 /* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */
64 #undef SUBTARGET_CPP_SPEC
65 #define SUBTARGET_CPP_SPEC "\
66 %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} \
67 %{mfp32: -D_MIPS_FPSET=16}%{!mfp32: -D_MIPS_FPSET=32} \
68 %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
69 %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
70 %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
71 %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \
72 %{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
73 %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \
74 %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
75 %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \
76 %{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
77 %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
78 %{mabi=32: -D_MIPS_SZLONG=32} \
79 %{mabi=n32: -D_MIPS_SZLONG=32} \
80 %{mabi=64: -D_MIPS_SZLONG=64} \
81 %{!mabi*: -D_MIPS_SZLONG=32} \
82 %{mabi=32: -D_MIPS_SZPTR=32} \
83 %{mabi=n32: -D_MIPS_SZPTR=32} \
84 %{mabi=64: -D_MIPS_SZPTR=64} \
85 %{!mabi*: -D_MIPS_SZPTR=32} \
86 %{!mips1:%{!mips2: -D_COMPILER_VERSION=601}} \
87 %{!mips*: -U__mips -D__mips=3} \
88 %{mabi=32: -U__mips64} \
89 %{mabi=n32: -D__mips64} \
90 %{mabi=64: -D__mips64} \
91 %{!mabi*: -D__mips64}"
93 /* Irix 6 uses DWARF-2. */
94 #define DWARF2_DEBUGGING_INFO
95 #define MIPS_DEBUGGING_INFO
96 #undef PREFERRED_DEBUGGING_TYPE
97 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
99 /* The size in bytes of a DWARF field indicating an offset or length
100 relative to a debug info section, specified to be 4 bytes in the DWARF-2
101 specification. The SGI/MIPS ABI defines it to be the same as PTR_SIZE. */
102 #define DWARF_OFFSET_SIZE PTR_SIZE
104 #undef MACHINE_TYPE
105 #define MACHINE_TYPE "SGI running IRIX 6.x"
107 /* The Irix 6.0.1 assembler doesn't like labels in the text section, so
108 just avoid emitting them. */
109 #define ASM_IDENTIFY_GCC
110 #define ASM_IDENTIFY_LANGUAGE
112 /* Irix 5 stuff that we don't need for Irix 6. */
113 /* ??? We do need this for the -mabi=32 switch though. */
114 #undef ASM_OUTPUT_UNDEF_FUNCTION
115 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
116 #undef ASM_DECLARE_FUNCTION_SIZE
118 /* Stuff we need for Irix 6 that isn't in Irix 5. */
120 /* The SGI assembler doesn't like labels before the .ent, so we must output
121 the .ent and function name here, which is the normal place for it. */
123 #undef ASM_DECLARE_FUNCTION_NAME
124 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
125 do { \
126 fputs ("\t.ent\t", STREAM); \
127 assemble_name (STREAM, NAME); \
128 fputs ("\n", STREAM); \
129 assemble_name (STREAM, NAME); \
130 fputs (":\n", STREAM); \
131 } while (0)
133 /* Likewise, the SGI assembler doesn't like labels after the .end, so we
134 must output the .end here. */
135 #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
136 do { \
137 fputs ("\t.end\t", STREAM); \
138 assemble_name (STREAM, NAME); \
139 fputs ("\n", STREAM); \
140 } while (0)
142 /* Tell function_prologue in mips.c that we have already output the .ent/.end
143 pseudo-ops. */
144 #define FUNCTION_NAME_ALREADY_DECLARED
146 #undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */
148 #if 0
149 /* This is *NOT* how to equate one symbol to another symbol. The assembler
150 '=' syntax just equates a name to a constant expression.
151 See ASM_OUTPUT_WEAK_ALIAS. */
153 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
154 do { fprintf ((FILE), "\t"); \
155 assemble_name (FILE, LABEL1); \
156 fprintf (FILE, " = "); \
157 assemble_name (FILE, LABEL2); \
158 fprintf (FILE, "\n"); \
159 } while (0)
160 #endif
162 /* Define the strings used for the special svr4 .type and .size directives. */
164 #define TYPE_ASM_OP ".type"
165 #define SIZE_ASM_OP ".size"
167 /* This is how we tell the assembler that a symbol is weak. */
169 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
170 do { \
171 fputs ("\t.weakext\t", FILE); \
172 assemble_name (FILE, NAME); \
173 if (VALUE) \
175 fputc (' ', FILE); \
176 assemble_name (FILE, VALUE); \
178 fputc ('\n', FILE); \
179 } while (0)
181 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
183 #define POPSECTION_ASM_OP ".popsection"
185 #define DEBUG_INFO_SECTION ".debug_info,0x7000001e,0,0,1"
186 #define DEBUG_LINE_SECTION ".debug_line,0x7000001e,0,0,1"
187 #define SFNAMES_SECTION ".debug_sfnames,0x7000001e,0,0,1"
188 #define SRCINFO_SECTION ".debug_srcinfo,0x7000001e,0,0,1"
189 #define MACINFO_SECTION ".debug_macinfo,0x7000001e,0,0,1"
190 #define PUBNAMES_SECTION ".debug_pubnames,0x7000001e,0,0,1"
191 #define ARANGES_SECTION ".debug_aranges,0x7000001e,0,0,1"
192 #define FRAME_SECTION ".debug_frame,0x7000001e,0x08000000,0,1"
193 #define ABBREV_SECTION ".debug_abbrev,0x7000001e,0,0,1"
195 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
196 on the mipsX option. */
197 #undef SUBTARGET_ASM_SPEC
198 #define SUBTARGET_ASM_SPEC "%{!mabi*:-n32}"
200 /* Must pass -g0 to the assembler, otherwise it may overwrite our
201 debug info with its own debug info. */
202 /* Must pass -show instead of -v. */
203 /* Must pass -G 0 to the assembler, otherwise we may get warnings about
204 GOT overflow. */
205 /* ??? We pass -w to disable all assembler warnings. The `label should be
206 inside .ent/.end block' warning that we get for DWARF II debug info labels
207 is particularly annoying. */
208 #undef SUBTARGET_MIPS_AS_ASM_SPEC
209 #define SUBTARGET_MIPS_AS_ASM_SPEC "%{v:-show} -G 0 -w"
211 #undef SUBTARGET_ASM_DEBUGGING_SPEC
212 #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
214 /* Stuff for constructors. Start here. */
216 /* The assembler now accepts .section pseudo-ops, but it does not allow
217 one to change the section in the middle of a function, so we can't use
218 the INIT_SECTION_ASM_OP code in crtstuff. But we can build up the ctor
219 and dtor lists this way, so we use -init and -fini to invoke the
220 do_global_* functions instead of running collect2. */
222 #define BSS_SECTION_ASM_OP ".section\t.bss"
223 #define CONST_SECTION_ASM_OP_32 "\t.rdata"
224 #define CONST_SECTION_ASM_OP_64 ".section\t.rodata"
226 /* The IRIX 6 assembler .section directive takes four additional args:
227 section type, flags, entry size, and alignment. The alignment of the
228 .ctors and .dtors sections needs to be the same as the size of a pointer
229 so that the linker doesn't add padding between elements. */
230 #if defined (CRT_BEGIN) || defined (CRT_END)
232 /* If we are included from crtstuff.c, these need to be plain strings.
233 _MIPS_SZPTR is defined in SUBTARGET_CPP_SPEC above. */
234 #if _MIPS_SZPTR == 64
235 #define CTORS_SECTION_ASM_OP ".section\t.ctors,1,2,0,8"
236 #define DTORS_SECTION_ASM_OP ".section\t.dtors,1,2,0,8"
237 #else /* _MIPS_SZPTR != 64 */
238 #define CTORS_SECTION_ASM_OP ".section\t.ctors,1,2,0,4"
239 #define DTORS_SECTION_ASM_OP ".section\t.dtors,1,2,0,4"
240 #endif /* _MIPS_SZPTR == 64 */
242 #else /* ! (defined (CRT_BEGIN) || defined (CRT_END)) */
244 /* If we are included from varasm.c, these need to depend on -mabi. */
245 #define CTORS_SECTION_ASM_OP \
246 (TARGET_LONG64 ? ".section\t.ctors,1,2,0,8" : ".section\t.ctors,1,2,0,4")
247 #define DTORS_SECTION_ASM_OP \
248 (TARGET_LONG64 ? ".section\t.dtors,1,2,0,8" : ".section\t.dtors,1,2,0,4")
249 #endif /* defined (CRT_BEGIN) || defined (CRT_END) */
251 /* dwarf2out will handle padding this data properly. We definitely don't
252 want it 8-byte aligned on n32. */
253 #define EH_FRAME_SECTION_ASM_OP ".section\t.eh_frame,1,2,0,1"
255 /* A default list of other sections which we might be "in" at any given
256 time. For targets that use additional sections (e.g. .tdesc) you
257 should override this definition in the target-specific file which
258 includes this file. */
260 #undef EXTRA_SECTIONS
261 #define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors
263 /* A default list of extra section function definitions. For targets
264 that use additional sections (e.g. .tdesc) you should override this
265 definition in the target-specific file which includes this file. */
267 /* ??? rdata_section is now same as svr4 const_section. */
269 #undef EXTRA_SECTION_FUNCTIONS
270 #define EXTRA_SECTION_FUNCTIONS \
271 void \
272 sdata_section () \
274 if (in_section != in_sdata) \
276 fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
277 in_section = in_sdata; \
281 void \
282 rdata_section () \
284 if (in_section != in_rdata) \
286 if (mips_abi != ABI_32) \
287 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \
288 else \
289 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \
290 in_section = in_rdata; \
293 CTORS_SECTION_FUNCTION \
294 DTORS_SECTION_FUNCTION
296 #define CTORS_SECTION_FUNCTION \
297 void \
298 ctors_section () \
300 if (in_section != in_ctors) \
302 fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
303 in_section = in_ctors; \
307 #define DTORS_SECTION_FUNCTION \
308 void \
309 dtors_section () \
311 if (in_section != in_dtors) \
313 fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
314 in_section = in_dtors; \
318 /* A C statement (sans semicolon) to output an element in the table of
319 global constructors. */
320 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
321 do { \
322 ctors_section (); \
323 fprintf (FILE, "\t%s\t ", \
324 TARGET_LONG64 ? ".dword" : ".word"); \
325 assemble_name (FILE, NAME); \
326 fprintf (FILE, "\n"); \
327 } while (0)
329 /* A C statement (sans semicolon) to output an element in the table of
330 global destructors. */
331 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
332 do { \
333 dtors_section (); \
334 fprintf (FILE, "\t%s\t ", \
335 TARGET_LONG64 ? ".dword" : ".word"); \
336 assemble_name (FILE, NAME); \
337 fprintf (FILE, "\n"); \
338 } while (0)
340 /* A C statement to output something to the assembler file to switch to section
341 NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
342 NULL_TREE. */
344 #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \
345 do { \
346 extern FILE *asm_out_text_file; \
347 if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
348 fprintf (asm_out_text_file, "\t.section %s,1,6,4,4\n", (NAME)); \
349 else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
350 fprintf (F, "\t.section %s,1,2,0,8\n", (NAME)); \
351 else \
352 fprintf (F, "\t.section %s,1,3,0,8\n", (NAME)); \
353 } while (0)
355 /* Stuff for constructors. End here. */
357 /* ??? Perhaps just include svr4.h in this file? */
359 /* ??? SGI assembler may core dump when compiling with -g.
360 Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc)
361 Getting rid of .file solves both problems. */
362 #undef ASM_OUTPUT_FILENAME
363 #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
364 do \
366 fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \
367 output_quoted_string (STREAM, NAME); \
368 fputs ("\n", STREAM); \
370 while (0)
372 /* ??? SGI assembler gives warning whenever .lcomm is used. */
373 #undef ASM_OUTPUT_LOCAL
374 #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \
375 do \
377 if (mips_abi != ABI_32) \
379 fprintf (STREAM, "%s\n", BSS_SECTION_ASM_OP); \
380 mips_declare_object (STREAM, NAME, "", ":\n", 0); \
381 ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
382 ASM_OUTPUT_SKIP (STREAM, SIZE); \
383 fprintf (STREAM, "\t%s\n", POPSECTION_ASM_OP); \
385 else \
386 mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \
388 while (0)
390 /* A C statement (sans semicolon) to output to the stdio stream
391 FILE the assembler definition of uninitialized global DECL named
392 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
393 Try to use asm_output_aligned_bss to implement this macro. */
395 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
396 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
398 /* Write the extra assembler code needed to declare an object properly. */
400 #undef ASM_DECLARE_OBJECT_NAME
401 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
402 do \
404 size_directive_output = 0; \
405 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
407 size_directive_output = 1; \
408 fprintf (STREAM, "\t%s\t ", SIZE_ASM_OP); \
409 assemble_name (STREAM, NAME); \
410 fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
412 mips_declare_object (STREAM, NAME, "", ":\n", 0); \
414 while (0)
416 /* Output the size directive for a decl in rest_of_decl_compilation
417 in the case where we did not do so before the initializer.
418 Once we find the error_mark_node, we know that the value of
419 size_directive_output was set
420 by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
422 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
423 do { \
424 char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
425 if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
426 && ! AT_END && TOP_LEVEL \
427 && DECL_INITIAL (DECL) == error_mark_node \
428 && !size_directive_output) \
430 size_directive_output = 1; \
431 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
432 assemble_name (FILE, name); \
433 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
435 } while (0)
437 #undef LOCAL_LABEL_PREFIX
438 #define LOCAL_LABEL_PREFIX (mips_abi == ABI_32 ? "$" : ".")
440 /* Profiling is supported via libprof1.a not -lc_p as in Irix 3. */
441 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
442 on the mipsX option. */
443 #undef STARTFILE_SPEC
444 #define STARTFILE_SPEC \
445 "%{!static:%{!shared: \
446 %{mabi=32:%{pg:gcrt1.o%s} \
447 %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
448 %{mabi=n32: \
449 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
450 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
451 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
452 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
453 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
454 %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
455 %{mabi=64: \
456 %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
457 %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
458 %{!p:/usr/lib64/mips4/crt1.o}}} \
459 %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
460 %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
461 %{!p:/usr/lib64/mips3/crt1.o}}}} \
462 %{!mabi*: \
463 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
464 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
465 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
466 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
467 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
468 %{!p:/usr/lib32/mips3/crt1.o%s}}}}}} \
469 %{static: \
470 %{mabi=32:%{pg:/usr/lib/nonshared/gcrt1.o%s} \
471 %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s /usr/lib/nonshared/libprof1.a%s} \
472 %{!p:/usr/lib/nonshared/crt1.o%s}}} \
473 %{mabi=n32: \
474 %{mips4:%{pg:/usr/lib32/mips4/nonshared/gcrt1.o%s} \
475 %{!pg:%{p:/usr/lib32/mips4/nonshared/mcrt1.o%s \
476 /usr/lib32/mips4/nonshared/libprof1.a%s} \
477 %{!p:/usr/lib32/mips4/nonshared/crt1.o%s}}} \
478 %{!mips4:%{pg:/usr/lib32/mips3/nonshared/gcrt1.o%s} \
479 %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
480 /usr/lib32/mips3/nonshared/libprof1.a%s} \
481 %{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}} \
482 %{mabi=64: \
483 %{mips4:%{pg:/usr/lib64/mips4/nonshared/gcrt1.o} \
484 %{!pg:%{p:/usr/lib64/mips4/nonshared/mcrt1.o \
485 /usr/lib64/mips4/nonshared/libprof1.a} \
486 %{!p:/usr/lib64/mips4/nonshared/crt1.o}}} \
487 %{!mips4:%{pg:/usr/lib64/mips3/nonshared/gcrt1.o} \
488 %{!pg:%{p:/usr/lib64/mips3/nonshared/mcrt1.o \
489 /usr/lib64/mips3/nonshared/libprof1.a} \
490 %{!p:/usr/lib64/mips3/nonshared/crt1.o}}}} \
491 %{!mabi*: \
492 %{mips4:%{pg:/usr/lib32/mips4/nonshared/gcrt1.o%s} \
493 %{!pg:%{p:/usr/lib32/mips4/nonshared/mcrt1.o%s \
494 /usr/lib32/mips4/nonshared/libprof1.a%s} \
495 %{!p:/usr/lib32/mips4/nonshared/crt1.o%s}}} \
496 %{!mips4:%{pg:/usr/lib32/mips3/nonshared/gcrt1.o%s} \
497 %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
498 /usr/lib32/mips3/nonshared/libprof1.a%s} \
499 %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
500 /usr/lib32/mips3/nonshared/libprof1.a%s} \
501 %{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}}}} \
502 crtbegin.o%s"
504 #undef LIB_SPEC
505 #define LIB_SPEC \
506 "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
507 -L/usr/lib32} \
508 %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
509 -L/usr/lib64} \
510 %{!mabi*: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
511 -L/usr/lib32} \
512 %{!shared: \
513 -dont_warn_unused %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc -warn_unused}"
515 /* Avoid getting two warnings for libgcc.a everytime we link. */
516 #undef LIBGCC_SPEC
517 #define LIBGCC_SPEC "-dont_warn_unused -lgcc -warn_unused"
519 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
520 on the mipsX option. */
521 #undef ENDFILE_SPEC
522 #define ENDFILE_SPEC \
523 "crtend.o%s \
524 %{!shared: \
525 %{mabi=32:crtn.o%s}\
526 %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
527 %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
528 %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
529 %{!mips4:/usr/lib64/mips3/crtn.o%s}}\
530 %{!mabi*:%{mips4:/usr/lib32/mips4/crtn.o%s}\
531 %{!mips4:/usr/lib32/mips3/crtn.o%s}}}"
533 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
534 on the mipsX option. */
535 #undef LINK_SPEC
536 #define LINK_SPEC "\
537 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
538 %{bestGnum} %{shared} %{non_shared} \
539 %{call_shared} %{no_archive} %{exact_version} %{w} \
540 %{static: -non_shared} \
541 %{!static: \
542 %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}}} \
543 %{rpath} -init __do_global_ctors -fini __do_global_dtors \
544 %{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__} \
545 -_SYSTYPE_SVR4 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64} %{!mabi*: -n32}"