]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/mips/iris6.h
Warning fixes:
[thirdparty/gcc.git] / gcc / config / mips / iris6.h
1 /* Definitions of target machine for GNU compiler. Iris version 6.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998 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, -mabi=64 implies TARGET_LONG64. */
34 /* This is handled in override_options. */
35
36 #undef SUBTARGET_CC1_SPEC
37 #define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
38
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)"
48
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}"
55
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}"
92
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
98
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
103
104 /* There is no GNU as port for Irix6 yet, so we set MD_EXEC_PREFIX so that
105 gcc will automatically find SGI as instead of searching the user's path.
106 The latter can fail when building a cross compiler if the user has . in
107 the path before /usr/bin, since then gcc will find and try to use the link
108 to the cross assembler which can't possibly work. */
109
110 #undef MD_EXEC_PREFIX
111 #define MD_EXEC_PREFIX "/usr/bin/"
112
113 /* We have no need for MD_STARTFILE_PREFIX. */
114 #undef MD_STARTFILE_PREFIX
115
116 #undef MACHINE_TYPE
117 #define MACHINE_TYPE "SGI running IRIX 6.x"
118
119 /* The Irix 6.0.1 assembler doesn't like labels in the text section, so
120 just avoid emitting them. */
121 #define ASM_IDENTIFY_GCC(x) ((void)0)
122 #define ASM_IDENTIFY_LANGUAGE(x) ((void)0)
123
124 /* Irix 5 stuff that we don't need for Irix 6. */
125 /* ??? We do need this for the -mabi=32 switch though. */
126 #undef ASM_OUTPUT_UNDEF_FUNCTION
127 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
128 #undef ASM_DECLARE_FUNCTION_SIZE
129
130 /* Stuff we need for Irix 6 that isn't in Irix 5. */
131
132 /* The SGI assembler doesn't like labels before the .ent, so we must output
133 the .ent and function name here, which is the normal place for it. */
134
135 #undef ASM_DECLARE_FUNCTION_NAME
136 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
137 do { \
138 fputs ("\t.ent\t", STREAM); \
139 assemble_name (STREAM, NAME); \
140 fputs ("\n", STREAM); \
141 assemble_name (STREAM, NAME); \
142 fputs (":\n", STREAM); \
143 } while (0)
144
145 /* Likewise, the SGI assembler doesn't like labels after the .end, so we
146 must output the .end here. */
147 #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
148 do { \
149 fputs ("\t.end\t", STREAM); \
150 assemble_name (STREAM, NAME); \
151 fputs ("\n", STREAM); \
152 } while (0)
153
154 /* Tell function_prologue in mips.c that we have already output the .ent/.end
155 pseudo-ops. */
156 #define FUNCTION_NAME_ALREADY_DECLARED
157
158 #undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */
159
160 #if 0
161 /* This is *NOT* how to equate one symbol to another symbol. The assembler
162 '=' syntax just equates a name to a constant expression.
163 See ASM_OUTPUT_WEAK_ALIAS. */
164
165 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
166 do { fprintf ((FILE), "\t"); \
167 assemble_name (FILE, LABEL1); \
168 fprintf (FILE, " = "); \
169 assemble_name (FILE, LABEL2); \
170 fprintf (FILE, "\n"); \
171 } while (0)
172 #endif
173
174 /* Define the strings used for the special svr4 .type and .size directives. */
175
176 #define TYPE_ASM_OP ".type"
177 #define SIZE_ASM_OP ".size"
178
179 /* This is how we tell the assembler that a symbol is weak. */
180
181 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
182 do { \
183 fputs ("\t.weakext\t", FILE); \
184 assemble_name (FILE, NAME); \
185 if (VALUE) \
186 { \
187 fputc (' ', FILE); \
188 assemble_name (FILE, VALUE); \
189 } \
190 fputc ('\n', FILE); \
191 } while (0)
192
193 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
194
195 #define POPSECTION_ASM_OP ".popsection"
196
197 #define DEBUG_INFO_SECTION ".debug_info,0x7000001e,0,0,1"
198 #define DEBUG_LINE_SECTION ".debug_line,0x7000001e,0,0,1"
199 #define SFNAMES_SECTION ".debug_sfnames,0x7000001e,0,0,1"
200 #define SRCINFO_SECTION ".debug_srcinfo,0x7000001e,0,0,1"
201 #define MACINFO_SECTION ".debug_macinfo,0x7000001e,0,0,1"
202 #define PUBNAMES_SECTION ".debug_pubnames,0x7000001e,0,0,1"
203 #define ARANGES_SECTION ".debug_aranges,0x7000001e,0,0,1"
204 #define FRAME_SECTION ".debug_frame,0x7000001e,0x08000000,0,1"
205 #define ABBREV_SECTION ".debug_abbrev,0x7000001e,0,0,1"
206
207 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
208 on the mipsX option. */
209 #undef SUBTARGET_ASM_SPEC
210 #define SUBTARGET_ASM_SPEC "%{!mabi*:-n32}"
211
212 /* Must pass -g0 to the assembler, otherwise it may overwrite our
213 debug info with its own debug info. */
214 /* Must pass -show instead of -v. */
215 /* Must pass -G 0 to the assembler, otherwise we may get warnings about
216 GOT overflow. */
217 /* ??? We pass -w to disable all assembler warnings. The `label should be
218 inside .ent/.end block' warning that we get for DWARF II debug info labels
219 is particularly annoying. */
220 #undef SUBTARGET_MIPS_AS_ASM_SPEC
221 #define SUBTARGET_MIPS_AS_ASM_SPEC "%{v:-show} -G 0 -w"
222
223 #undef SUBTARGET_ASM_DEBUGGING_SPEC
224 #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
225
226 /* Stuff for constructors. Start here. */
227
228 /* The assembler now accepts .section pseudo-ops, but it does not allow
229 one to change the section in the middle of a function, so we can't use
230 the INIT_SECTION_ASM_OP code in crtstuff. But we can build up the ctor
231 and dtor lists this way, so we use -init and -fini to invoke the
232 do_global_* functions instead of running collect2. */
233
234 #define BSS_SECTION_ASM_OP ".section\t.bss"
235 #define CONST_SECTION_ASM_OP_32 "\t.rdata"
236 #define CONST_SECTION_ASM_OP_64 ".section\t.rodata"
237
238 /* The IRIX 6 assembler .section directive takes four additional args:
239 section type, flags, entry size, and alignment. The alignment of the
240 .ctors and .dtors sections needs to be the same as the size of a pointer
241 so that the linker doesn't add padding between elements. */
242 #if defined (CRT_BEGIN) || defined (CRT_END)
243
244 /* If we are included from crtstuff.c, these need to be plain strings.
245 _MIPS_SZPTR is defined in SUBTARGET_CPP_SPEC above. */
246 #if _MIPS_SZPTR == 64
247 #define CTORS_SECTION_ASM_OP ".section\t.ctors,1,2,0,8"
248 #define DTORS_SECTION_ASM_OP ".section\t.dtors,1,2,0,8"
249 #else /* _MIPS_SZPTR != 64 */
250 #define CTORS_SECTION_ASM_OP ".section\t.ctors,1,2,0,4"
251 #define DTORS_SECTION_ASM_OP ".section\t.dtors,1,2,0,4"
252 #endif /* _MIPS_SZPTR == 64 */
253
254 #else /* ! (defined (CRT_BEGIN) || defined (CRT_END)) */
255
256 /* If we are included from varasm.c, these need to depend on -mabi. */
257 #define CTORS_SECTION_ASM_OP \
258 (TARGET_LONG64 ? ".section\t.ctors,1,2,0,8" : ".section\t.ctors,1,2,0,4")
259 #define DTORS_SECTION_ASM_OP \
260 (TARGET_LONG64 ? ".section\t.dtors,1,2,0,8" : ".section\t.dtors,1,2,0,4")
261 #endif /* defined (CRT_BEGIN) || defined (CRT_END) */
262
263 /* dwarf2out will handle padding this data properly. We definitely don't
264 want it 8-byte aligned on n32. */
265 #define EH_FRAME_SECTION_ASM_OP ".section\t.eh_frame,1,2,0,1"
266
267 /* A default list of other sections which we might be "in" at any given
268 time. For targets that use additional sections (e.g. .tdesc) you
269 should override this definition in the target-specific file which
270 includes this file. */
271
272 #undef EXTRA_SECTIONS
273 #define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors
274
275 /* A default list of extra section function definitions. For targets
276 that use additional sections (e.g. .tdesc) you should override this
277 definition in the target-specific file which includes this file. */
278
279 /* ??? rdata_section is now same as svr4 const_section. */
280
281 #undef EXTRA_SECTION_FUNCTIONS
282 #define EXTRA_SECTION_FUNCTIONS \
283 void \
284 sdata_section () \
285 { \
286 if (in_section != in_sdata) \
287 { \
288 fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
289 in_section = in_sdata; \
290 } \
291 } \
292 \
293 void \
294 rdata_section () \
295 { \
296 if (in_section != in_rdata) \
297 { \
298 if (mips_abi != ABI_32) \
299 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \
300 else \
301 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \
302 in_section = in_rdata; \
303 } \
304 } \
305 CTORS_SECTION_FUNCTION \
306 DTORS_SECTION_FUNCTION
307
308 #define CTORS_SECTION_FUNCTION \
309 void \
310 ctors_section () \
311 { \
312 if (in_section != in_ctors) \
313 { \
314 fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
315 in_section = in_ctors; \
316 } \
317 }
318
319 #define DTORS_SECTION_FUNCTION \
320 void \
321 dtors_section () \
322 { \
323 if (in_section != in_dtors) \
324 { \
325 fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
326 in_section = in_dtors; \
327 } \
328 }
329
330 /* A C statement (sans semicolon) to output an element in the table of
331 global constructors. */
332 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
333 do { \
334 ctors_section (); \
335 fprintf (FILE, "\t%s\t ", \
336 TARGET_LONG64 ? ".dword" : ".word"); \
337 assemble_name (FILE, NAME); \
338 fprintf (FILE, "\n"); \
339 } while (0)
340
341 /* A C statement (sans semicolon) to output an element in the table of
342 global destructors. */
343 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
344 do { \
345 dtors_section (); \
346 fprintf (FILE, "\t%s\t ", \
347 TARGET_LONG64 ? ".dword" : ".word"); \
348 assemble_name (FILE, NAME); \
349 fprintf (FILE, "\n"); \
350 } while (0)
351
352 /* A C statement to output something to the assembler file to switch to section
353 NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
354 NULL_TREE. */
355
356 #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \
357 do { \
358 extern FILE *asm_out_text_file; \
359 if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
360 fprintf (asm_out_text_file, "\t.section %s,1,6,4,4\n", (NAME)); \
361 else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
362 fprintf (F, "\t.section %s,1,2,0,8\n", (NAME)); \
363 else \
364 fprintf (F, "\t.section %s,1,3,0,8\n", (NAME)); \
365 } while (0)
366
367 /* Stuff for constructors. End here. */
368
369 /* ??? Perhaps just include svr4.h in this file? */
370
371 /* ??? SGI assembler may core dump when compiling with -g.
372 Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc)
373 Getting rid of .file solves both problems. */
374 #undef ASM_OUTPUT_FILENAME
375 #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
376 do \
377 { \
378 fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \
379 output_quoted_string (STREAM, NAME); \
380 fputs ("\n", STREAM); \
381 } \
382 while (0)
383
384 /* ??? SGI assembler gives warning whenever .lcomm is used. */
385 #undef ASM_OUTPUT_LOCAL
386 #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \
387 do \
388 { \
389 if (mips_abi != ABI_32) \
390 { \
391 fprintf (STREAM, "%s\n", BSS_SECTION_ASM_OP); \
392 mips_declare_object (STREAM, NAME, "", ":\n", 0); \
393 ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
394 ASM_OUTPUT_SKIP (STREAM, SIZE); \
395 fprintf (STREAM, "\t%s\n", POPSECTION_ASM_OP); \
396 } \
397 else \
398 mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \
399 } \
400 while (0)
401
402 /* A C statement (sans semicolon) to output to the stdio stream
403 FILE the assembler definition of uninitialized global DECL named
404 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
405 Try to use asm_output_aligned_bss to implement this macro. */
406
407 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
408 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
409
410 /* Write the extra assembler code needed to declare an object properly. */
411
412 #undef ASM_DECLARE_OBJECT_NAME
413 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
414 do \
415 { \
416 size_directive_output = 0; \
417 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
418 { \
419 size_directive_output = 1; \
420 fprintf (STREAM, "\t%s\t ", SIZE_ASM_OP); \
421 assemble_name (STREAM, NAME); \
422 fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
423 } \
424 mips_declare_object (STREAM, NAME, "", ":\n", 0); \
425 } \
426 while (0)
427
428 /* Output the size directive for a decl in rest_of_decl_compilation
429 in the case where we did not do so before the initializer.
430 Once we find the error_mark_node, we know that the value of
431 size_directive_output was set
432 by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
433
434 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
435 do { \
436 char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
437 if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
438 && ! AT_END && TOP_LEVEL \
439 && DECL_INITIAL (DECL) == error_mark_node \
440 && !size_directive_output) \
441 { \
442 size_directive_output = 1; \
443 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
444 assemble_name (FILE, name); \
445 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
446 } \
447 } while (0)
448
449 #undef LOCAL_LABEL_PREFIX
450 #define LOCAL_LABEL_PREFIX (mips_abi == ABI_32 ? "$" : ".")
451
452 /* Profiling is supported via libprof1.a not -lc_p as in Irix 3. */
453 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
454 on the mipsX option. */
455 #undef STARTFILE_SPEC
456 #define STARTFILE_SPEC \
457 "%{!static:%{!shared: \
458 %{mabi=32:%{pg:gcrt1.o%s} \
459 %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
460 %{mabi=n32: \
461 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
462 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
463 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
464 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
465 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
466 %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
467 %{mabi=64: \
468 %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
469 %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
470 %{!p:/usr/lib64/mips4/crt1.o}}} \
471 %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
472 %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
473 %{!p:/usr/lib64/mips3/crt1.o}}}} \
474 %{!mabi*: \
475 %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
476 %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
477 %{!p:/usr/lib32/mips4/crt1.o%s}}} \
478 %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
479 %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
480 %{!p:/usr/lib32/mips3/crt1.o%s}}}}}} \
481 %{static: \
482 %{mabi=32:%{pg:/usr/lib/nonshared/gcrt1.o%s} \
483 %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s /usr/lib/nonshared/libprof1.a%s} \
484 %{!p:/usr/lib/nonshared/crt1.o%s}}} \
485 %{mabi=n32: \
486 %{mips4:%{pg:/usr/lib32/mips4/nonshared/gcrt1.o%s} \
487 %{!pg:%{p:/usr/lib32/mips4/nonshared/mcrt1.o%s \
488 /usr/lib32/mips4/nonshared/libprof1.a%s} \
489 %{!p:/usr/lib32/mips4/nonshared/crt1.o%s}}} \
490 %{!mips4:%{pg:/usr/lib32/mips3/nonshared/gcrt1.o%s} \
491 %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
492 /usr/lib32/mips3/nonshared/libprof1.a%s} \
493 %{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}} \
494 %{mabi=64: \
495 %{mips4:%{pg:/usr/lib64/mips4/nonshared/gcrt1.o} \
496 %{!pg:%{p:/usr/lib64/mips4/nonshared/mcrt1.o \
497 /usr/lib64/mips4/nonshared/libprof1.a} \
498 %{!p:/usr/lib64/mips4/nonshared/crt1.o}}} \
499 %{!mips4:%{pg:/usr/lib64/mips3/nonshared/gcrt1.o} \
500 %{!pg:%{p:/usr/lib64/mips3/nonshared/mcrt1.o \
501 /usr/lib64/mips3/nonshared/libprof1.a} \
502 %{!p:/usr/lib64/mips3/nonshared/crt1.o}}}} \
503 %{!mabi*: \
504 %{mips4:%{pg:/usr/lib32/mips4/nonshared/gcrt1.o%s} \
505 %{!pg:%{p:/usr/lib32/mips4/nonshared/mcrt1.o%s \
506 /usr/lib32/mips4/nonshared/libprof1.a%s} \
507 %{!p:/usr/lib32/mips4/nonshared/crt1.o%s}}} \
508 %{!mips4:%{pg:/usr/lib32/mips3/nonshared/gcrt1.o%s} \
509 %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
510 /usr/lib32/mips3/nonshared/libprof1.a%s} \
511 %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
512 /usr/lib32/mips3/nonshared/libprof1.a%s} \
513 %{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}}}} \
514 crtbegin.o%s"
515
516 #undef LIB_SPEC
517 #define LIB_SPEC \
518 "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
519 -L/usr/lib32} \
520 %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
521 -L/usr/lib64} \
522 %{!mabi*: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
523 -L/usr/lib32} \
524 %{!shared: \
525 -dont_warn_unused %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc -warn_unused}"
526
527 /* Avoid getting two warnings for libgcc.a everytime we link. */
528 #undef LIBGCC_SPEC
529 #define LIBGCC_SPEC "-dont_warn_unused -lgcc -warn_unused"
530
531 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
532 on the mipsX option. */
533 #undef ENDFILE_SPEC
534 #define ENDFILE_SPEC \
535 "crtend.o%s \
536 %{!shared: \
537 %{mabi=32:crtn.o%s}\
538 %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
539 %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
540 %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
541 %{!mips4:/usr/lib64/mips3/crtn.o%s}}\
542 %{!mabi*:%{mips4:/usr/lib32/mips4/crtn.o%s}\
543 %{!mips4:/usr/lib32/mips3/crtn.o%s}}}"
544
545 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
546 on the mipsX option. */
547 #undef LINK_SPEC
548 #define LINK_SPEC "\
549 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
550 %{bestGnum} %{shared} %{non_shared} \
551 %{call_shared} %{no_archive} %{exact_version} %{w} \
552 %{static: -non_shared} \
553 %{!static: \
554 %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}}} \
555 %{rpath} -init __do_global_ctors -fini __do_global_dtors \
556 %{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__,__frame_dummy} \
557 -_SYSTYPE_SVR4 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64} %{!mabi*: -n32}"