OSDN Git Service

* aix43.h (ASM_CPU_SPEC, CPP_CPU_SPEC): Add rs64a and PPC630.
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / sysv4.h
1 /* Target definitions for GNU compiler for PowerPC running System V.4
2    Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
3    Contributed by Cygnus Support.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 /* Small data support types */
23 enum rs6000_sdata_type {
24   SDATA_NONE,                   /* no small data support */
25   SDATA_DATA,                   /* just put data in .sbss/.sdata, don't use relocs */
26   SDATA_SYSV,                   /* Use r13 to point to .sdata/.sbss */
27   SDATA_EABI                    /* Use r13 like above, r2 points to .sdata2/.sbss2 */
28 };
29
30 extern enum rs6000_sdata_type rs6000_sdata;
31
32 /* V.4/eabi switches */
33 #define MASK_NO_BITFIELD_TYPE   0x40000000      /* Set PCC_BITFIELD_TYPE_MATTERS to 0 */
34 #define MASK_STRICT_ALIGN       0x20000000      /* Set STRICT_ALIGNMENT to 1.  */
35 #define MASK_RELOCATABLE        0x10000000      /* GOT pointers are PC relative */
36 #define MASK_EABI               0x08000000      /* Adhere to eabi, not System V spec */
37 #define MASK_LITTLE_ENDIAN      0x04000000      /* target is little endian */
38 #define MASK_REGNAMES           0x02000000      /* use alternate register names.  */
39 #define MASK_PROTOTYPE          0x01000000      /* Only prototyped fcns pass variable args */
40
41 #define TARGET_NO_BITFIELD_TYPE (target_flags & MASK_NO_BITFIELD_TYPE)
42 #define TARGET_STRICT_ALIGN     (target_flags & MASK_STRICT_ALIGN)
43 #define TARGET_RELOCATABLE      (target_flags & MASK_RELOCATABLE)
44 #define TARGET_EABI             (target_flags & MASK_EABI)
45 #define TARGET_LITTLE_ENDIAN    (target_flags & MASK_LITTLE_ENDIAN)
46 #define TARGET_REGNAMES         (target_flags & MASK_REGNAMES)
47 #define TARGET_PROTOTYPE        (target_flags & MASK_PROTOTYPE)
48 #define TARGET_TOC              ((target_flags & MASK_64BIT)            \
49                                  || ((target_flags & (MASK_RELOCATABLE  \
50                                                       | MASK_MINIMAL_TOC)) \
51                                      && flag_pic > 1)                   \
52                                  || DEFAULT_ABI == ABI_AIX              \
53                                  || DEFAULT_ABI == ABI_NT)
54
55 #define TARGET_BITFIELD_TYPE    (! TARGET_NO_BITFIELD_TYPE)
56 #define TARGET_BIG_ENDIAN       (! TARGET_LITTLE_ENDIAN)
57 #define TARGET_NO_PROTOTYPE     (! TARGET_PROTOTYPE)
58 #define TARGET_NO_TOC           (! TARGET_TOC)
59 #define TARGET_NO_EABI          (! TARGET_EABI)
60
61 /* Pseudo target to indicate whether the object format is ELF
62    (to get around not having conditional compilation in the md file)  */
63 #define TARGET_ELF              1
64
65 /* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be just
66    the same as -mminimal-toc.  */
67 #undef  SUBTARGET_SWITCHES
68 #define SUBTARGET_SWITCHES                                              \
69   { "bit-align",        -MASK_NO_BITFIELD_TYPE },                       \
70   { "no-bit-align",      MASK_NO_BITFIELD_TYPE },                       \
71   { "strict-align",      MASK_STRICT_ALIGN },                           \
72   { "no-strict-align",  -MASK_STRICT_ALIGN },                           \
73   { "relocatable",       MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC }, \
74   { "no-relocatable",   -MASK_RELOCATABLE },                            \
75   { "relocatable-lib",   MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC }, \
76   { "no-relocatable-lib", -MASK_RELOCATABLE },                          \
77   { "little-endian",     MASK_LITTLE_ENDIAN },                          \
78   { "little",            MASK_LITTLE_ENDIAN },                          \
79   { "big-endian",       -MASK_LITTLE_ENDIAN },                          \
80   { "big",              -MASK_LITTLE_ENDIAN },                          \
81   { "no-toc",            0 },                                           \
82   { "toc",               MASK_MINIMAL_TOC },                            \
83   { "full-toc",          MASK_MINIMAL_TOC },                            \
84   { "prototype",         MASK_PROTOTYPE },                              \
85   { "no-prototype",     -MASK_PROTOTYPE },                              \
86   { "no-traceback",      0 },                                           \
87   { "eabi",              MASK_EABI },                                   \
88   { "no-eabi",          -MASK_EABI },                                   \
89   { "regnames",           MASK_REGNAMES },                              \
90   { "no-regnames",       -MASK_REGNAMES },                              \
91   { "sdata",             0 },                                           \
92   { "no-sdata",          0 },                                           \
93   { "sim",               0 },                                           \
94   { "ads",               0 },                                           \
95   { "yellowknife",       0 },                                           \
96   { "mvme",              0 },                                           \
97   { "emb",               0 },                                           \
98   { "solaris-cclib",     0 },                                           \
99   { "shlib",             0 },                                           \
100   EXTRA_SUBTARGET_SWITCHES                                              \
101   { "newlib",            0 },
102
103 /* This is meant to be redefined in the host dependent files */
104 #define EXTRA_SUBTARGET_SWITCHES
105
106 /* Default ABI to use */
107 #define RS6000_ABI_NAME "sysv"
108
109 /* Strings provided by SUBTARGET_OPTIONS */
110 extern const char *rs6000_abi_name;
111 extern const char *rs6000_sdata_name;
112
113 #define SUBTARGET_OPTIONS                                               \
114   { "call-",  &rs6000_abi_name},                                        \
115   { "sdata=", &rs6000_sdata_name}
116
117 /* Max # of bytes for variables to automatically be put into the .sdata
118    or .sdata2 sections.  */
119 extern int g_switch_value;              /* value of the -G xx switch */
120 extern int g_switch_set;                /* whether -G xx was passed.  */
121
122 #ifndef SDATA_DEFAULT_SIZE
123 #define SDATA_DEFAULT_SIZE 8
124 #endif
125
126 /* Sometimes certain combinations of command options do not make sense
127    on a particular target machine.  You can define a macro
128    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
129    defined, is executed once just after all the command options have
130    been parsed.
131
132    The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
133    get control.  */
134
135 #define SUBTARGET_OVERRIDE_OPTIONS                                      \
136 do {                                                                    \
137   if (!g_switch_set)                                                    \
138     g_switch_value = SDATA_DEFAULT_SIZE;                                \
139                                                                         \
140   if (!strcmp (rs6000_abi_name, "sysv"))                                \
141     rs6000_current_abi = ABI_V4;                                        \
142   else if (!strcmp (rs6000_abi_name, "sysv-noeabi"))                    \
143     {                                                                   \
144       rs6000_current_abi = ABI_V4;                                      \
145       target_flags &= ~ MASK_EABI;                                      \
146     }                                                                   \
147   else if (!strcmp (rs6000_abi_name, "sysv-eabi")                       \
148            || !strcmp (rs6000_abi_name, "eabi"))                        \
149     {                                                                   \
150       rs6000_current_abi = ABI_V4;                                      \
151       target_flags |= MASK_EABI;                                        \
152     }                                                                   \
153   else if (!strcmp (rs6000_abi_name, "aix"))                            \
154     {                                                                   \
155       rs6000_current_abi = ABI_AIX_NODESC;                              \
156       target_flags |= MASK_EABI;                                        \
157     }                                                                   \
158   else if (!strcmp (rs6000_abi_name, "aixdesc"))                        \
159     rs6000_current_abi = ABI_AIX;                                       \
160   else if (!strcmp (rs6000_abi_name, "nt"))                             \
161     rs6000_current_abi = ABI_NT;                                        \
162   else if (!strcmp (rs6000_abi_name, "linux"))                          \
163     rs6000_current_abi = ABI_V4;                                        \
164   else if (!strcmp (rs6000_abi_name, "solaris"))                        \
165     rs6000_current_abi = ABI_SOLARIS;                                   \
166   else                                                                  \
167     {                                                                   \
168       rs6000_current_abi = ABI_V4;                                      \
169       error ("Bad value for -mcall-%s", rs6000_abi_name);               \
170     }                                                                   \
171                                                                         \
172   if (rs6000_sdata_name)                                                \
173     {                                                                   \
174       if (!strcmp (rs6000_sdata_name, "none"))                          \
175         rs6000_sdata = SDATA_NONE;                                      \
176       else if (!strcmp (rs6000_sdata_name, "data"))                     \
177         rs6000_sdata = SDATA_DATA;                                      \
178       else if (!strcmp (rs6000_sdata_name, "default"))                  \
179         rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV;         \
180       else if (!strcmp (rs6000_sdata_name, "sysv"))                     \
181         rs6000_sdata = SDATA_SYSV;                                      \
182       else if (!strcmp (rs6000_sdata_name, "eabi"))                     \
183         rs6000_sdata = SDATA_EABI;                                      \
184       else                                                              \
185         error ("Bad value for -msdata=%s", rs6000_sdata_name);          \
186     }                                                                   \
187   else if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)         \
188     {                                                                   \
189       rs6000_sdata = SDATA_DATA;                                        \
190       rs6000_sdata_name = "data";                                       \
191     }                                                                   \
192   else                                                                  \
193     {                                                                   \
194       rs6000_sdata = SDATA_NONE;                                        \
195       rs6000_sdata_name = "none";                                       \
196     }                                                                   \
197                                                                         \
198   if (TARGET_RELOCATABLE &&                                             \
199       (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))       \
200     {                                                                   \
201       rs6000_sdata = SDATA_DATA;                                        \
202       error ("-mrelocatable and -msdata=%s are incompatible.",          \
203              rs6000_sdata_name);                                        \
204     }                                                                   \
205                                                                         \
206   else if (flag_pic &&                                                  \
207            (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))  \
208     {                                                                   \
209       rs6000_sdata = SDATA_DATA;                                        \
210       error ("-f%s and -msdata=%s are incompatible.",                   \
211              (flag_pic > 1) ? "PIC" : "pic",                            \
212              rs6000_sdata_name);                                        \
213     }                                                                   \
214                                                                         \
215   if (rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4               \
216       && DEFAULT_ABI != ABI_SOLARIS)                                    \
217     {                                                                   \
218       rs6000_sdata = SDATA_NONE;                                        \
219       error ("-msdata=%s and -mcall-%s are incompatible.",              \
220              rs6000_sdata_name, rs6000_abi_name);                       \
221     }                                                                   \
222                                                                         \
223   if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC)                        \
224     {                                                                   \
225       target_flags |= MASK_MINIMAL_TOC;                                 \
226       error ("-mrelocatable and -mno-minimal-toc are incompatible.");   \
227     }                                                                   \
228                                                                         \
229   if (TARGET_RELOCATABLE &&                                             \
230       (rs6000_current_abi == ABI_AIX || rs6000_current_abi == ABI_NT))  \
231     {                                                                   \
232       target_flags &= ~MASK_RELOCATABLE;                                \
233       error ("-mrelocatable and -mcall-%s are incompatible.",           \
234              rs6000_abi_name);                                          \
235     }                                                                   \
236                                                                         \
237   if (flag_pic > 1 &&                                                   \
238       (rs6000_current_abi == ABI_AIX || rs6000_current_abi == ABI_NT))  \
239     {                                                                   \
240       flag_pic = 0;                                                     \
241       error ("-fPIC and -mcall-%s are incompatible.",                   \
242              rs6000_abi_name);                                          \
243     }                                                                   \
244                                                                         \
245   if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN)            \
246     {                                                                   \
247       target_flags &= ~MASK_LITTLE_ENDIAN;                              \
248       error ("-mcall-aixdesc must be big endian");                      \
249     }                                                                   \
250                                                                         \
251   if (rs6000_current_abi == ABI_NT && TARGET_BIG_ENDIAN)                \
252     {                                                                   \
253       target_flags |= MASK_LITTLE_ENDIAN;                               \
254       error ("-mcall-nt must be little endian");                        \
255     }                                                                   \
256                                                                         \
257   /* Treat -fPIC the same as -mrelocatable */                           \
258   if (flag_pic > 1)                                                     \
259     target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \
260                                                                         \
261   else if (TARGET_RELOCATABLE)                                          \
262     flag_pic = 2;                                                       \
263                                                                         \
264 } while (0)
265
266 /* Default ABI to compile code for */
267 #define DEFAULT_ABI rs6000_current_abi
268
269 #define CPP_DEFAULT_SPEC "-D_ARCH_PPC"
270
271 #define ASM_DEFAULT_SPEC "-mppc"
272
273 #include "rs6000/rs6000.h"
274
275 #undef TARGET_DEFAULT
276 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
277
278 #undef PROCESSOR_DEFAULT
279 #define PROCESSOR_DEFAULT PROCESSOR_PPC750
280
281 /* System V.4 uses register 13 as a pointer to the small data area,
282    so it is not available to the normal user.  */
283
284 #undef  FIXED_R13
285 #define FIXED_R13 1
286
287 /* System V.4 passes the first 8 floating arguments in registers,
288    instead of the first 13 like AIX does.  */
289 #undef  FP_ARG_MAX_REG
290 #define FP_ARG_MAX_REG ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_AIX_NODESC) \
291                         ? FP_ARG_AIX_MAX_REG : FP_ARG_V4_MAX_REG)
292
293 /* Size of the V.4 varargs area if needed */
294 #undef  RS6000_VARARGS_AREA
295 #define RS6000_VARARGS_AREA ((rs6000_sysv_varargs_p) ? RS6000_VARARGS_SIZE : 0)
296
297 /* Override default big endianism */
298 #undef  BYTES_BIG_ENDIAN
299 #undef  WORDS_BIG_ENDIAN
300 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
301 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
302
303 /* Define this to set the endianness to use in libgcc2.c, which can
304    not depend on target_flags.  */
305 #if !defined(_LITTLE_ENDIAN) && !defined(__sun__)
306 #define LIBGCC2_WORDS_BIG_ENDIAN 1
307 #else
308 #define LIBGCC2_WORDS_BIG_ENDIAN 0
309 #endif
310
311 /* Size of the outgoing register save area */
312 #undef  RS6000_REG_SAVE
313 #define RS6000_REG_SAVE ((DEFAULT_ABI == ABI_AIX                        \
314                           || DEFAULT_ABI == ABI_AIX_NODESC)             \
315                          ? (TARGET_64BIT ? 64 : 32)                     \
316                          : 0)
317
318 /* Size of the fixed area on the stack.  For AIX, use the standard 6 word
319    area, otherwise use 2 words to store back chain & LR.  */
320 #undef  RS6000_SAVE_AREA
321 #define RS6000_SAVE_AREA \
322   (((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_AIX_NODESC) ? 24 : 8) << (TARGET_64BIT ? 1 : 0))
323
324 /* Define cutoff for using external functions to save floating point.
325    Currently on V.4, always use inline stores */
326 #undef  FP_SAVE_INLINE
327 #define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 64)
328
329 /* Don't generate XCOFF debugging information.  */
330
331 #undef XCOFF_DEBUGGING_INFO
332
333 /* Don't use the COFF object file format.  */
334
335 #undef OBJECT_FORMAT_COFF
336
337 /* Don't bother to output .extern pseudo-ops.  They are not needed by
338    ELF assemblers.  */
339
340 #undef ASM_OUTPUT_EXTERNAL
341
342 /* Put jump tables in read-only memory, rather than in .text.  */
343 #undef JUMP_TABLES_IN_TEXT_SECTION
344 #define JUMP_TABLES_IN_TEXT_SECTION 0
345
346 /* Disable AIX-ism that disables turning -B into -L if the argument specifies a
347    relative file name.  This breaks setting GCC_EXEC_PREFIX to D:\path under
348    Windows.  */
349 #undef RELATIVE_PREFIX_NOT_LINKDIR
350
351 /* Undefine some things which are defined by the generic svr4.h.  */
352
353 #undef ASM_FILE_END
354 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
355 #undef READONLY_DATA_SECTION
356 #undef SELECT_SECTION
357 #undef ASM_DECLARE_FUNCTION_NAME
358 #undef ASM_OUTPUT_CONSTRUCTOR
359 #undef ASM_OUTPUT_DESTRUCTOR
360
361 /* Use the regular svr4 definitions.  */
362
363 #include "svr4.h"
364
365 /* Prefix and suffix to use to saving floating point */
366 #undef  SAVE_FP_PREFIX
367 #undef  SAVE_FP_SUFFIX
368 #define SAVE_FP_PREFIX "_savefpr_"
369 #define SAVE_FP_SUFFIX "_l"
370
371 /* Prefix and suffix to use to restoring floating point */
372 #undef  RESTORE_FP_PREFIX
373 #undef  RESTORE_FP_SUFFIX
374 #define RESTORE_FP_PREFIX "_restfpr_"
375 #define RESTORE_FP_SUFFIX "_l"
376
377 /* Type used for ptrdiff_t, as a string used in a declaration.  */
378 #undef  PTRDIFF_TYPE
379 #define PTRDIFF_TYPE "int"
380
381 /* Type used for wchar_t, as a string used in a declaration.  */
382 #undef  WCHAR_TYPE
383 #define WCHAR_TYPE "long int"
384
385 /* Width of wchar_t in bits.  */
386 #undef  WCHAR_TYPE_SIZE
387 #define WCHAR_TYPE_SIZE 32
388
389 /* Make int foo : 8 not cause structures to be aligned to an int boundary */
390
391 #undef  PCC_BITFIELD_TYPE_MATTERS
392 #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
393
394 /* Define this macro to be the value 1 if instructions will fail to
395    work if given data not on the nominal alignment.  If instructions
396    will merely go slower in that case, define this macro as 0.  */
397 #undef  STRICT_ALIGNMENT
398 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
399
400 /* Alignment in bits of the stack boundary.  Note, in order to allow building
401    one set of libraries with -mno-eabi instead of eabi libraries and non-eabi
402    versions, just use 64 as the stack boundary.  */
403 #undef  STACK_BOUNDARY
404 #define STACK_BOUNDARY  64
405
406 /* Real stack boundary as mandated by the appropriate ABI */
407 #define ABI_STACK_BOUNDARY ((TARGET_EABI) ? 64 : 128)
408
409 /* No data type wants to be aligned rounder than this.  */
410 #undef  BIGGEST_ALIGNMENT
411 #define BIGGEST_ALIGNMENT ((TARGET_EABI) ? 64 : 128)
412
413 #undef  BIGGEST_FIELD_ALIGNMENT
414 #undef  ADJUST_FIELD_ALIGN
415 #undef  ROUND_TYPE_ALIGN
416
417 /* Use ELF style section commands.  */
418
419 #undef TEXT_SECTION_ASM_OP
420 #define TEXT_SECTION_ASM_OP     "\t.section\t\".text\""
421
422 #undef DATA_SECTION_ASM_OP
423 #define DATA_SECTION_ASM_OP     "\t.section\t\".data\""
424
425 #undef BSS_SECTION_ASM_OP
426 #define BSS_SECTION_ASM_OP      "\t.section\t\".bss\""
427
428 #undef INIT_SECTION_ASM_OP
429 #define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
430
431 #undef FINI_SECTION_ASM_OP
432 #define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
433
434 #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
435
436 /* Put PC relative got entries in .got2 */
437 #define MINIMAL_TOC_SECTION_ASM_OP \
438   ((TARGET_RELOCATABLE || flag_pic) ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
439
440 /* Put relocatable data in .data, not .rodata so initialized pointers can be updated */
441 #undef  CONST_SECTION_ASM_OP
442 #define CONST_SECTION_ASM_OP \
443   ((TARGET_RELOCATABLE || flag_pic) ? "\t.section\t\".data\"\t# .rodata" : "\t.section\t\".rodata\"")
444
445
446 #define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
447 #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
448 #define SBSS_SECTION_ASM_OP \
449   ((DEFAULT_ABI == ABI_SOLARIS) ? "\t.section\t\".sbss\",\"aw\"" : "\t.section\t\".sbss\",\"aw\",@nobits")
450
451
452 /* Besides the usual ELF sections, we need a toc section.  */
453 #undef EXTRA_SECTIONS
454 #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini
455
456 #undef EXTRA_SECTION_FUNCTIONS
457 #define EXTRA_SECTION_FUNCTIONS                                         \
458   CONST_SECTION_FUNCTION                                                \
459   CTORS_SECTION_FUNCTION                                                \
460   DTORS_SECTION_FUNCTION                                                \
461   TOC_SECTION_FUNCTION                                                  \
462   SDATA_SECTION_FUNCTION                                                \
463   SDATA2_SECTION_FUNCTION                                               \
464   SBSS_SECTION_FUNCTION                                                 \
465   INIT_SECTION_FUNCTION                                                 \
466   FINI_SECTION_FUNCTION
467
468 extern void toc_section (), sdata_section (), sdata2_section ();
469 extern void sbss_section ();
470
471 #define TOC_SECTION_FUNCTION                                            \
472 void                                                                    \
473 toc_section ()                                                          \
474 {                                                                       \
475   if (in_section != in_toc)                                             \
476     {                                                                   \
477       in_section = in_toc;                                              \
478       if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)             \
479           && TARGET_MINIMAL_TOC                                         \
480           && !TARGET_RELOCATABLE)                                       \
481         {                                                               \
482           if (! toc_initialized)                                        \
483             {                                                           \
484               toc_initialized = 1;                                      \
485               fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);       \
486               ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LCTOC", 0);     \
487               fprintf (asm_out_file, "\t.tc ");                         \
488               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); \
489               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
490               fprintf (asm_out_file, "\n");                             \
491                                                                         \
492               fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
493               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
494               fprintf (asm_out_file, " = .+32768\n");                   \
495             }                                                           \
496           else                                                          \
497             fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
498         }                                                               \
499       else if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)        \
500                && !TARGET_RELOCATABLE)                                  \
501         fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);             \
502       else                                                              \
503         {                                                               \
504           fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);   \
505           if (! toc_initialized)                                        \
506             {                                                           \
507               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
508               fprintf (asm_out_file, " = .+32768\n");                   \
509               toc_initialized = 1;                                      \
510             }                                                           \
511         }                                                               \
512     }                                                                   \
513 }
514
515 #define SDATA_SECTION_FUNCTION                                          \
516 void                                                                    \
517 sdata_section ()                                                        \
518 {                                                                       \
519   if (in_section != in_sdata)                                           \
520     {                                                                   \
521       in_section = in_sdata;                                            \
522       fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);             \
523     }                                                                   \
524 }
525
526 #define SDATA2_SECTION_FUNCTION                                         \
527 void                                                                    \
528 sdata2_section ()                                                       \
529 {                                                                       \
530   if (in_section != in_sdata2)                                          \
531     {                                                                   \
532       in_section = in_sdata2;                                           \
533       fprintf (asm_out_file, "%s\n", SDATA2_SECTION_ASM_OP);            \
534     }                                                                   \
535 }
536
537 #define SBSS_SECTION_FUNCTION                                           \
538 void                                                                    \
539 sbss_section ()                                                         \
540 {                                                                       \
541   if (in_section != in_sbss)                                            \
542     {                                                                   \
543       in_section = in_sbss;                                             \
544       fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP);              \
545     }                                                                   \
546 }
547
548 #define INIT_SECTION_FUNCTION                                           \
549 void                                                                    \
550 init_section ()                                                         \
551 {                                                                       \
552   if (in_section != in_init)                                            \
553     {                                                                   \
554       in_section = in_init;                                             \
555       fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP);              \
556     }                                                                   \
557 }
558
559 #define FINI_SECTION_FUNCTION                                           \
560 void                                                                    \
561 fini_section ()                                                         \
562 {                                                                       \
563   if (in_section != in_fini)                                            \
564     {                                                                   \
565       in_section = in_fini;                                             \
566       fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP);              \
567     }                                                                   \
568 }
569
570 /* A C statement or statements to switch to the appropriate section
571    for output of RTX in mode MODE.  You can assume that RTX is some
572    kind of constant in RTL.  The argument MODE is redundant except in
573    the case of a `const_int' rtx.  Select the section by calling
574    `text_section' or one of the alternatives for other sections.
575
576    Do not define this macro if you put all constants in the read-only
577    data section.  */
578
579 extern void rs6000_select_rtx_section (), rs6000_select_section ();
580
581 #undef SELECT_RTX_SECTION
582 #define SELECT_RTX_SECTION(MODE, X) rs6000_select_rtx_section (MODE, X)
583
584 /* A C statement or statements to switch to the appropriate
585    section for output of DECL.  DECL is either a `VAR_DECL' node
586    or a constant of some sort.  RELOC indicates whether forming
587    the initial value of DECL requires link-time relocations.  */
588
589 #undef SELECT_SECTION
590 #define SELECT_SECTION(DECL,RELOC) rs6000_select_section (DECL, RELOC)
591
592 /* Return non-zero if this entry is to be written into the constant pool
593    in a special way.  We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
594    containing one of them.  If -mfp-in-toc (the default), we also do
595    this for floating-point constants.  We actually can only do this
596    if the FP formats of the target and host machines are the same, but
597    we can't check that since not every file that uses
598    GO_IF_LEGITIMATE_ADDRESS_P includes real.h.
599
600    Unlike AIX, we don't key off of -mminimal-toc, but instead do not
601    allow floating point constants in the TOC if -mrelocatable.  */
602
603 #undef  ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
604 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X)                              \
605   (TARGET_TOC                                                           \
606    && (GET_CODE (X) == SYMBOL_REF                                       \
607        || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS      \
608            && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF)           \
609        || GET_CODE (X) == LABEL_REF                                     \
610        || (!TARGET_NO_FP_IN_TOC                                         \
611            && !TARGET_RELOCATABLE                                       \
612            && GET_CODE (X) == CONST_DOUBLE                              \
613            && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT               \
614            && BITS_PER_WORD == HOST_BITS_PER_INT)))
615
616 /* These macros generate the special .type and .size directives which
617    are used to set the corresponding fields of the linker symbol table
618    entries in an ELF object file under SVR4.  These macros also output
619    the starting labels for the relevant functions/objects.  */
620
621 /* Write the extra assembler code needed to declare a function properly.
622    Some svr4 assemblers need to also have something extra said about the
623    function's return value.  We allow for that here.  */
624
625 extern int rs6000_pic_labelno;
626
627 #undef  ASM_DECLARE_FUNCTION_NAME
628 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)                     \
629   do {                                                                  \
630     char *orig_name;                                                    \
631     char *init_ptr = (TARGET_64BIT) ? ".quad" : ".long";                \
632     STRIP_NAME_ENCODING (orig_name, NAME);                              \
633                                                                         \
634     if (TARGET_RELOCATABLE && (get_pool_size () != 0 || profile_flag))  \
635       {                                                                 \
636         char buf[256], *buf_ptr;                                        \
637                                                                         \
638         ASM_OUTPUT_INTERNAL_LABEL (FILE, "LCL", rs6000_pic_labelno);    \
639                                                                         \
640         ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);                  \
641         STRIP_NAME_ENCODING (buf_ptr, buf);                             \
642         fprintf (FILE, "\t%s %s-", init_ptr, buf_ptr);                  \
643                                                                         \
644         ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno);   \
645         fprintf (FILE, "%s\n", buf_ptr);                                \
646       }                                                                 \
647                                                                         \
648     fprintf (FILE, "\t%s\t %s,", TYPE_ASM_OP, orig_name);               \
649     fprintf (FILE, TYPE_OPERAND_FMT, "function");                       \
650     putc ('\n', FILE);                                                  \
651     ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));                      \
652                                                                         \
653     if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)                \
654       {                                                                 \
655         char *desc_name = orig_name;                                    \
656                                                                         \
657         while (*desc_name == '.')                                       \
658           desc_name++;                                                  \
659                                                                         \
660         if (TREE_PUBLIC (DECL))                                         \
661           fprintf (FILE, "\t.globl %s\n", desc_name);                   \
662                                                                         \
663         fprintf (FILE, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);             \
664         fprintf (FILE, "%s:\n", desc_name);                             \
665         fprintf (FILE, "\t%s %s\n", init_ptr, orig_name);               \
666         fprintf (FILE, "\t%s _GLOBAL_OFFSET_TABLE_\n", init_ptr);       \
667         if (DEFAULT_ABI == ABI_AIX)                                     \
668           fprintf (FILE, "\t%s 0\n", init_ptr);                         \
669         fprintf (FILE, "\t.previous\n");                                \
670       }                                                                 \
671     fprintf (FILE, "%s:\n", orig_name);                                 \
672   } while (0)
673
674 /* How to renumber registers for dbx and gdb.  */
675
676 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
677
678 /* svr4.h overrides ASM_OUTPUT_INTERNAL_LABEL.  */
679
680 #undef ASM_OUTPUT_INTERNAL_LABEL_PREFIX
681 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX)   \
682   fprintf (FILE, ".%s", PREFIX)
683
684 /* This is how to allocate empty space in some section.  Use .space
685    instead of .zero because the Solaris PowerPC assembler doesn't
686    like it, and gas accepts either syntax.  */
687
688 #undef  SKIP_ASM_OP
689 #define SKIP_ASM_OP     ".space"
690
691 /* This says how to output assembler code to declare an
692    uninitialized internal linkage data object.  Under SVR4,
693    the linker seems to want the alignment of data objects
694    to depend on their types.  We do exactly that here.  */
695
696 #ifndef LOCAL_ASM_OP
697 #define LOCAL_ASM_OP    ".local"
698 #endif
699
700 #ifndef LCOMM_ASM_OP
701 #define LCOMM_ASM_OP    ".lcomm"
702 #endif
703
704 #undef ASM_OUTPUT_ALIGNED_LOCAL
705 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
706 do {                                                                    \
707   if (rs6000_sdata != SDATA_NONE && (SIZE) > 0                          \
708       && (SIZE) <= g_switch_value)                                      \
709     {                                                                   \
710       sbss_section ();                                                  \
711       ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT));      \
712       ASM_OUTPUT_LABEL (FILE, NAME);                                    \
713       ASM_OUTPUT_SKIP (FILE, SIZE);                                     \
714       if (!flag_inhibit_size_directive && (SIZE) > 0)                   \
715         {                                                               \
716           fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                       \
717           assemble_name (FILE, NAME);                                   \
718           fprintf (FILE, ",%d\n",  SIZE);                               \
719         }                                                               \
720     }                                                                   \
721   else                                                                  \
722     {                                                                   \
723       fprintf (FILE, "\t%s\t", LCOMM_ASM_OP);                           \
724       assemble_name ((FILE), (NAME));                                   \
725       fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);    \
726     }                                                                   \
727 } while (0)
728
729 /* Describe how to emit uninitialized external linkage items  */
730 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN)           \
731 do {                                                                    \
732   ASM_GLOBALIZE_LABEL (FILE, NAME);                                     \
733   ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN);                   \
734 } while (0)
735
736 /* Switch  Recognition by gcc.c.  Add -G xx support */
737
738 #undef SWITCH_TAKES_ARG
739 #define SWITCH_TAKES_ARG(CHAR)                                          \
740   ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o'                      \
741    || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u'                   \
742    || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x'                   \
743    || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V'                   \
744    || (CHAR) == 'B' || (CHAR) == 'b' || (CHAR) == 'G')
745
746 /* Output .file.  */
747 #undef ASM_FILE_START
748 #define ASM_FILE_START(FILE)                                            \
749 do {                                                                    \
750   output_file_directive ((FILE), main_input_filename);                  \
751   rs6000_file_start (FILE, TARGET_CPU_DEFAULT);                         \
752 } while (0)
753
754
755 /* This is how to output an assembler line defining an `int' constant.
756    For -mrelocatable, we mark all addresses that need to be fixed up
757    in the .fixup section.  */
758 #undef  ASM_OUTPUT_INT
759 #define ASM_OUTPUT_INT(FILE,VALUE)                                      \
760 do {                                                                    \
761   static int recurse = 0;                                               \
762   if ((TARGET_RELOCATABLE || flag_pic)                                  \
763       && in_section != in_toc                                           \
764       && in_section != in_text                                          \
765       && in_section != in_ctors                                         \
766       && in_section != in_dtors                                         \
767       && !recurse                                                       \
768       && GET_CODE (VALUE) != CONST_INT                                  \
769       && GET_CODE (VALUE) != CONST_DOUBLE                               \
770       && CONSTANT_P (VALUE))                                            \
771     {                                                                   \
772       static int labelno = 0;                                           \
773       char buf[256], *p;                                                \
774                                                                         \
775       recurse = 1;                                                      \
776       ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", labelno++);              \
777       STRIP_NAME_ENCODING (p, buf);                                     \
778       fprintf (FILE, "%s:\n", p);                                       \
779       fprintf (FILE, "\t.long (");                                      \
780       output_addr_const (FILE, (VALUE));                                \
781       fprintf (FILE, ")@fixup\n");                                      \
782       fprintf (FILE, "\t.section\t\".fixup\",\"aw\"\n");                        \
783       ASM_OUTPUT_ALIGN (FILE, 2);                                       \
784       fprintf (FILE, "\t.long\t%s\n", p);                               \
785       fprintf (FILE, "\t.previous\n");                                  \
786       recurse = 0;                                                      \
787     }                                                                   \
788   /* Remove initial .'s to turn a -mcall-aixdesc or -mcall-nt function  \
789      address into the address of the descriptor, not the function       \
790      itself.  */                                                        \
791   else if (GET_CODE (VALUE) == SYMBOL_REF                               \
792            && XSTR (VALUE, 0)[0] == '.'                                 \
793            && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT))        \
794     {                                                                   \
795       char *name = XSTR (VALUE, 0);                                     \
796       while (*name == '.')                                              \
797         name++;                                                         \
798                                                                         \
799       fprintf (FILE, "\t.long %s\n", name);                             \
800     }                                                                   \
801   else                                                                  \
802     {                                                                   \
803       fprintf (FILE, "\t.long ");                                       \
804       output_addr_const (FILE, (VALUE));                                \
805       fprintf (FILE, "\n");                                             \
806     }                                                                   \
807 } while (0)
808
809 /* This is the end of what might become sysv4.h.  */
810
811 /* Allow stabs and dwarf, for now, make stabs the default debugging type,
812    not dwarf since G++ doesn't support dwarf. */
813 #undef  PREFERRED_DEBUGGING_TYPE
814 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
815
816 #define DBX_DEBUGGING_INFO
817 #define DWARF_DEBUGGING_INFO
818
819 /* If we are referencing a function that is static or is known to be
820    in this file, make the SYMBOL_REF special.  We can use this to indicate
821    that we can branch to this function without emitting a no-op after the
822    call.  For real AIX and NT calling sequences, we also replace the
823    function name with the real name (1 or 2 leading .'s), rather than
824    the function descriptor name.  This saves a lot of overriding code
825    to readd the prefixes.  */
826
827 #undef  ENCODE_SECTION_INFO
828 #define ENCODE_SECTION_INFO(DECL) rs6000_encode_section_info (DECL)
829
830 extern void rs6000_encode_section_info ();
831
832 /* This macro gets just the user-specified name
833    out of the string in a SYMBOL_REF.  Discard
834    a leading * or @. */
835 #undef  STRIP_NAME_ENCODING
836 #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME)                            \
837 do {                                                                    \
838   char *_name = SYMBOL_NAME;                                            \
839   while (*_name == '*' || *_name == '@')                                \
840     _name++;                                                            \
841   (VAR) = _name;                                                        \
842 } while (0)
843
844 /* This is how to output a reference to a user-level label named NAME.
845    `assemble_name' uses this.  */
846
847 #undef ASM_OUTPUT_LABELREF
848 #define ASM_OUTPUT_LABELREF(FILE,NAME)  \
849 do {                                                                    \
850   char *_name = NAME;                                                   \
851   while (*_name == '*' || *_name == '@')                                \
852     _name++;                                                            \
853   fputs (_name, FILE);                                                  \
854 } while (0)
855
856 /*
857  * Switch into a generic section.
858  *
859  * We make the section read-only and executable for a function decl,
860  * read-only for a const data decl, and writable for a non-const data decl.
861  *
862  * If the section has already been defined, we must not
863  * emit the attributes here. The SVR4 assembler does not
864  * recognize section redefinitions.
865  * If DECL is NULL, no attributes are emitted.
866  *
867  * Note, Solaris as doesn't like @nobits, and gas can handle .sbss without
868  * needing @nobits.
869  */
870
871 #undef  ASM_OUTPUT_SECTION_NAME
872 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC)                \
873 do {                                                                    \
874   static struct section_info                                            \
875     {                                                                   \
876       struct section_info *next;                                        \
877       char *name;                                                       \
878       enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type;                \
879     } *sections;                                                        \
880   struct section_info *s;                                               \
881   char *mode;                                                           \
882   enum sect_enum type;                                                  \
883                                                                         \
884   for (s = sections; s; s = s->next)                                    \
885     if (!strcmp (NAME, s->name))                                        \
886       break;                                                            \
887                                                                         \
888   if (DECL && TREE_CODE (DECL) == FUNCTION_DECL)                        \
889     type = SECT_EXEC, mode = "ax";                                      \
890   else if (DECL && DECL_READONLY_SECTION (DECL, RELOC) && !TARGET_RELOCATABLE && !flag_pic) \
891     type = SECT_RO, mode = "a";                                         \
892   else                                                                  \
893     type = SECT_RW, mode = "aw";                                        \
894                                                                         \
895   if (s == 0)                                                           \
896     {                                                                   \
897       s = (struct section_info *) xmalloc (sizeof (struct section_info));  \
898       s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME));         \
899       strcpy (s->name, NAME);                                           \
900       s->type = type;                                                   \
901       s->next = sections;                                               \
902       sections = s;                                                     \
903       fprintf (FILE, "\t.section\t\"%s\",\"%s\"\n", NAME, mode);        \
904     }                                                                   \
905   else                                                                  \
906     {                                                                   \
907       if (DECL && s->type != type)                                      \
908         error_with_decl (DECL, "%s causes a section type conflict");    \
909                                                                         \
910       fprintf (FILE, "\t.section\t\"%s\"\n", NAME);                     \
911     }                                                                   \
912 } while (0)
913
914 #undef ASM_OUTPUT_CONSTRUCTOR
915 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
916   do {                                                                  \
917     if (DEFAULT_ABI != ABI_SOLARIS)                                     \
918       {                                                                 \
919         ctors_section ();                                               \
920         fprintf (FILE, "\t%s\t ", INT_ASM_OP);                          \
921         assemble_name (FILE, NAME);                                     \
922       }                                                                 \
923     else                                                                \
924       {                                                                 \
925         init_section ();                                                \
926         fputs ("\tbl ", FILE);                                          \
927         assemble_name (FILE, NAME);                                     \
928       }                                                                 \
929     fputs ("\n", FILE);                                                 \
930   } while (0)
931
932 /* A C statement (sans semicolon) to output an element in the table of
933    global destructors.  */
934 #undef ASM_OUTPUT_DESTRUCTOR
935 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
936   do {                                                                  \
937     if (DEFAULT_ABI != ABI_SOLARIS)                                     \
938       {                                                                 \
939         dtors_section ();                                               \
940         fprintf (FILE, "\t%s\t ", INT_ASM_OP);                          \
941         assemble_name (FILE, NAME);                                     \
942       }                                                                 \
943     else                                                                \
944       {                                                                 \
945         fini_section ();                                                \
946         fputs ("\tbl ", FILE);                                          \
947         assemble_name (FILE, NAME);                                     \
948       }                                                                 \
949     fputs ("\n", FILE);                                                 \
950   } while (0)
951
952 /* But, to make this work, we have to output the stabs for the function
953    name *first*...  */
954
955 #define DBX_FUNCTION_FIRST
956
957 /* This is the end of what might become sysv4dbx.h.  */
958
959 #undef TARGET_VERSION
960 #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
961 \f
962 #undef CPP_PREDEFINES
963 #define CPP_PREDEFINES \
964   "-DPPC -Dunix -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(powerpc) -Amachine(powerpc)"
965
966 /* Pass various options to the assembler */
967 #undef ASM_SPEC
968 #define ASM_SPEC "%(asm_cpu) \
969 %{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \
970 %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
971 %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
972 %{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
973 %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} \
974 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
975     %{mcall-solaris: -mlittle -msolaris} \
976     %{mcall-linux: -mbig} }}}}"
977
978 #ifndef CC1_ENDIAN_BIG_SPEC
979 #define CC1_ENDIAN_BIG_SPEC ""
980 #endif
981
982 #ifndef CC1_ENDIAN_LITTLE_SPEC
983 #define CC1_ENDIAN_LITTLE_SPEC "\
984 %{!mstrict-align: %{!mno-strict-align: \
985         -mstrict-align \
986 }}"
987 #endif
988
989 #ifndef CC1_ENDIAN_DEFAULT_SPEC
990 #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big_spec)"
991 #endif
992
993 #undef CC1_SPEC
994 /* Pass -G xxx to the compiler and set correct endian mode */
995 #define CC1_SPEC "%{G*} \
996 %{mlittle: %(cc1_endian_little)} %{!mlittle: %{mlittle-endian: %(cc1_endian_little)}} \
997 %{mbig: %(cc1_endian_big)} %{!mbig: %{mbig-endian: %(cc1_endian_big)}} \
998     %{mcall-nt: -mlittle %{cc1_endian_little} } \
999     %{mcall-aixdesc: -mbig %{cc1_endian_big} } \
1000     %{mcall-solaris: -mlittle %{cc1_endian_little} } \
1001     %{mcall-linux: -mbig %{cc1_endian_big} } \
1002     %{!mcall-nt: %{!mcall-aixdesc: %{!mcall-solaris: %{!mcall-linux: \
1003             %(cc1_endian_default) \
1004     }}}} \
1005 %{mcall-solaris: -mregnames } \
1006 %{mno-sdata: -msdata=none } \
1007 %{meabi: %{!mcall-*: -mcall-sysv }} \
1008 %{!meabi: %{!mno-eabi: \
1009     %{mrelocatable: -meabi } \
1010     %{mcall-solaris: -mno-eabi } \
1011     %{mcall-linux: -mno-eabi }}} \
1012 %{msdata: -msdata=default} \
1013 %{mno-sdata: -msdata=none} \
1014 %{profile: -p}"
1015
1016 /* Don't put -Y P,<path> for cross compilers */
1017 #undef LINK_PATH_SPEC
1018 #ifndef CROSS_COMPILE
1019 #define LINK_PATH_SPEC "\
1020 %{!R*:%{L*:-R %*}} \
1021 %{!nostdlib: %{!YP,*: \
1022     %{compat-bsd: \
1023         %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
1024         %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
1025         %{!R*: %{!L*: -R /usr/ucblib}} \
1026     %{!compat-bsd: \
1027         %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
1028         %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
1029
1030 #else
1031 #define LINK_PATH_SPEC ""
1032 #endif
1033
1034 /* Default starting address if specified */
1035 #ifndef LINK_START_SPEC
1036 #define LINK_START_SPEC "\
1037 %{mads: %(link_start_ads) } \
1038 %{myellowknife: %(link_start_yellowknife) } \
1039 %{mmvme: %(link_start_mvme) } \
1040 %{msim: %(link_start_sim) } \
1041 %{mcall-linux: %(link_start_linux) } \
1042 %{mcall-solaris: %(link_start_solaris) } \
1043 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_start_default) }}}}}}"
1044 #endif
1045
1046 #ifndef LINK_START_DEFAULT_SPEC
1047 #define LINK_START_DEFAULT_SPEC ""
1048 #endif
1049
1050 #undef LINK_SPEC
1051 #define LINK_SPEC "\
1052 %{h*} %{v:-V} %{G*} \
1053 %{Wl,*:%*} %{YP,*} %{R*} \
1054 %{Qy:} %{!Qn:-Qy} \
1055 %(link_shlib) \
1056 %{!Ttext*: %(link_start) } \
1057 %(link_target) \
1058 %(link_os)"
1059
1060 /* For now, turn off shared libraries by default.  */
1061 #ifndef SHARED_LIB_SUPPORT
1062 #define NO_SHARED_LIB_SUPPORT
1063 #endif
1064
1065 #undef  LINK_SHLIB_SPEC
1066 #ifndef NO_SHARED_LIB_SUPPORT
1067 /* Shared libraries are default.  */
1068 #define LINK_SHLIB_SPEC "\
1069 %{!static: %(link_path) %{!R*:%{L*:-R %*}}} \
1070 %{mshlib: } \
1071 %{static:-dn -Bstatic} \
1072 %{shared:-G -dy -z text} \
1073 %{symbolic:-Bsymbolic -G -dy -z text}"
1074
1075 #else
1076 /* Shared libraries are not default.  */
1077 #define LINK_SHLIB_SPEC "\
1078 %{mshlib: %(link_path) } \
1079 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
1080 %{static: } \
1081 %{shared:-G -dy -z text %(link_path) } \
1082 %{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
1083 #endif
1084
1085 /* Override the default target of the linker.  */
1086 #undef  LINK_TARGET_SPEC
1087 #define LINK_TARGET_SPEC "\
1088 %{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \
1089 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: %{mcall-solaris: -oformat elf32-powerpcle}}}}}"
1090
1091 /* Any specific OS flags */
1092 #ifndef LINK_OS_SPEC
1093 #define LINK_OS_SPEC "\
1094 %{mads: %(link_os_ads) } \
1095 %{myellowknife: %(link_os_yellowknife) } \
1096 %{mmvme: %(link_os_mvme) } \
1097 %{msim: %(link_os_sim) } \
1098 %{mcall-linux: %(link_os_linux) } \
1099 %{mcall-solaris: %(link_os_solaris) } \
1100 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_os_default) }}}}}}"
1101 #endif
1102
1103 #ifndef LINK_OS_DEFAULT_SPEC
1104 #define LINK_OS_DEFAULT_SPEC ""
1105 #endif
1106
1107 #undef  CPP_SYSV_SPEC
1108 #define CPP_SYSV_SPEC \
1109 "%{mrelocatable*: -D_RELOCATABLE} \
1110 %{fpic: -D__PIC__=1 -D__pic__=1} \
1111 %{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}} \
1112 %{mcall-sysv: -D_CALL_SYSV} %{mcall-nt: -D_CALL_NT} \
1113 %{mcall-aix: -D_CALL_AIX} %{mcall-aixdesc: -D_CALL_AIX -D_CALL_AIXDESC} \
1114 %{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %{!mcall-nt: %(cpp_sysv_default) }}}} \
1115 %{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}"
1116
1117 #undef  CPP_SYSV_DEFAULT_SPEC
1118 #define CPP_SYSV_DEFAULT_SPEC "-D_CALL_SYSV"
1119
1120 #ifndef CPP_ENDIAN_BIG_SPEC
1121 #define CPP_ENDIAN_BIG_SPEC "-D_BIG_ENDIAN -D__BIG_ENDIAN__ -Amachine(bigendian)"
1122 #endif
1123
1124 #ifndef CPP_ENDIAN_LITTLE_SPEC
1125 #define CPP_ENDIAN_LITTLE_SPEC "-D_LITTLE_ENDIAN -D__LITTLE_ENDIAN__ -Amachine(littleendian)"
1126 #endif
1127
1128 #ifndef CPP_ENDIAN_SOLARIS_SPEC
1129 #define CPP_ENDIAN_SOLARIS_SPEC "-D__LITTLE_ENDIAN__ -Amachine(littleendian)"
1130 #endif
1131
1132 /* For solaris, don't define _LITTLE_ENDIAN, it conflicts with a header file.  */
1133 #undef  CPP_ENDIAN_SPEC
1134 #define CPP_ENDIAN_SPEC \
1135 "%{mlittle: %(cpp_endian_little) } \
1136 %{mlittle-endian: %(cpp_endian_little) } \
1137 %{mbig: %(cpp_endian_big) } \
1138 %{mbig-endian: %(cpp_endian_big) } \
1139 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
1140     %{mcall-solaris: %(cpp_endian_solaris) } \
1141     %{mcall-nt: %(cpp_endian_little) } \
1142     %{mcall-linux: %(cpp_endian_big) } \
1143     %{mcall-aixdesc:  %(cpp_endian_big) } \
1144     %{!mcall-solaris: %{!mcall-linux: %{!mcall-nt: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}"
1145
1146 #undef  CPP_ENDIAN_DEFAULT_SPEC
1147 #define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_big)"
1148
1149 #undef CPP_SPEC
1150 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian) %(cpp_cpu) \
1151 %{mads: %(cpp_os_ads) } \
1152 %{myellowknife: %(cpp_os_yellowknife) } \
1153 %{mmvme: %(cpp_os_mvme) } \
1154 %{msim: %(cpp_os_sim) } \
1155 %{mcall-linux: %(cpp_os_linux) } \
1156 %{mcall-solaris: %(cpp_os_solaris) } \
1157 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}}}"
1158
1159 #ifndef CPP_OS_DEFAULT_SPEC
1160 #define CPP_OS_DEFAULT_SPEC ""
1161 #endif
1162
1163 #undef  STARTFILE_SPEC
1164 #define STARTFILE_SPEC "\
1165 %{mads: %(startfile_ads) } \
1166 %{myellowknife: %(startfile_yellowknife) } \
1167 %{mmvme: %(startfile_mvme) } \
1168 %{msim: %(startfile_sim) } \
1169 %{mcall-linux: %(startfile_linux) } \
1170 %{mcall-solaris: %(startfile_solaris) } \
1171 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(startfile_default) }}}}}}"
1172
1173 #undef  STARTFILE_DEFAULT_SPEC
1174 #define STARTFILE_DEFAULT_SPEC ""
1175
1176 #undef  LIB_SPEC
1177 #define LIB_SPEC "\
1178 %{mads: %(lib_ads) } \
1179 %{myellowknife: %(lib_yellowknife) } \
1180 %{mmvme: %(lib_mvme) } \
1181 %{msim: %(lib_sim) } \
1182 %{mcall-linux: %(lib_linux) } \
1183 %{mcall-solaris: %(lib_solaris) } \
1184 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(lib_default) }}}}}}"
1185
1186 #undef  LIBGCC_SPEC
1187 #define LIBGCC_SPEC "libgcc.a%s"
1188
1189 #ifndef LIB_DEFAULT_SPEC
1190 #define LIB_DEFAULT_SPEC ""
1191 #endif
1192
1193 #undef  ENDFILE_SPEC
1194 #define ENDFILE_SPEC "\
1195 %{mads: ecrtn.o%s} \
1196 %{myellowknife: ecrtn.o%s} \
1197 %{mmvme: ecrtn.o%s} \
1198 %{msim: ecrtn.o%s} \
1199 %{mcall-linux: %(endfile_linux) } \
1200 %{mcall-solaris: scrtn.o%s} \
1201 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(endfile_default) }}}}}}"
1202
1203 #undef  ENDFILE_DEFAULT_SPEC
1204 #define ENDFILE_DEFAULT_SPEC ""
1205
1206 /* Motorola ADS support.  */
1207 #ifndef LIB_ADS_SPEC
1208 #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
1209 #endif
1210
1211 #ifndef STARTFILE_ADS_SPEC
1212 #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s"
1213 #endif
1214
1215 #ifndef ENDFILE_ADS_SPEC
1216 #define ENDFILE_ADS_SPEC "ecrtn.o%s"
1217 #endif
1218
1219 #ifndef LINK_START_ADS_SPEC
1220 #define LINK_START_ADS_SPEC "-T ads.ld%s"
1221 #endif
1222
1223 #ifndef LINK_OS_ADS_SPEC
1224 #define LINK_OS_ADS_SPEC ""
1225 #endif
1226
1227 #ifndef CPP_OS_ADS_SPEC
1228 #define CPP_OS_ADS_SPEC ""
1229 #endif
1230
1231 /* Motorola Yellowknife support.  */
1232 #ifndef LIB_YELLOWKNIFE_SPEC
1233 #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
1234 #endif
1235
1236 #ifndef STARTFILE_YELLOWKNIFE_SPEC
1237 #define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s"
1238 #endif
1239
1240 #ifndef ENDFILE_YELLOWKNIFE_SPEC
1241 #define ENDFILE_YELLOWKNIFE_SPEC "ecrtn.o%s"
1242 #endif
1243
1244 #ifndef LINK_START_YELLOWKNIFE_SPEC
1245 #define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
1246 #endif
1247
1248 #ifndef LINK_OS_YELLOWKNIFE_SPEC
1249 #define LINK_OS_YELLOWKNIFE_SPEC ""
1250 #endif
1251
1252 #ifndef CPP_OS_YELLOWKNIFE_SPEC
1253 #define CPP_OS_YELLOWKNIFE_SPEC ""
1254 #endif
1255
1256 /* Motorola MVME support.  */
1257 #ifndef LIB_MVME_SPEC
1258 #define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
1259 #endif
1260
1261 #ifndef STARTFILE_MVME_SPEC
1262 #define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s"
1263 #endif
1264
1265 #ifndef ENDFILE_MVME_SPEC
1266 #define ENDFILE_MVME_SPEC "ecrtn.o%s"
1267 #endif
1268
1269 #ifndef LINK_START_MVME_SPEC
1270 #define LINK_START_MVME_SPEC "%{!Wl,-T*: %{!T*: -Ttext 0x40000}}"
1271 #endif
1272
1273 #ifndef LINK_OS_MVME_SPEC
1274 #define LINK_OS_MVME_SPEC ""
1275 #endif
1276
1277 #ifndef CPP_OS_MVME_SPEC
1278 #define CPP_OS_MVME_SPEC ""
1279 #endif
1280
1281 /* PowerPC simulator based on netbsd system calls support.  */
1282 #ifndef LIB_SIM_SPEC
1283 #define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
1284 #endif
1285
1286 #ifndef STARTFILE_SIM_SPEC
1287 #define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s"
1288 #endif
1289
1290 #ifndef ENDFILE_SIM_SPEC
1291 #define ENDFILE_SIM_SPEC "ecrtn.o%s"
1292 #endif
1293
1294 #ifndef LINK_START_SIM_SPEC
1295 #define LINK_START_SIM_SPEC "-Ttext 0x10000074"
1296 #endif
1297
1298 #ifndef LINK_OS_SIM_SPEC
1299 #define LINK_OS_SIM_SPEC ""
1300 #endif
1301
1302 #ifndef CPP_OS_SIM_SPEC
1303 #define CPP_OS_SIM_SPEC ""
1304 #endif
1305
1306 /* GNU/Linux support.  */
1307 #ifndef LIB_LINUX_SPEC
1308 #ifdef USE_GNULIBC_1
1309 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
1310 %{!mnewlib: -lc }"
1311 #else
1312 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
1313 %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
1314 %{profile:-lc_p} %{!profile:-lc}}}"
1315 #endif
1316 #endif
1317
1318 #ifndef STARTFILE_LINUX_SPEC
1319 #define STARTFILE_LINUX_SPEC "\
1320 %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
1321 %{mnewlib: ecrti.o%s} \
1322 %{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
1323 #endif
1324
1325 #ifndef ENDFILE_LINUX_SPEC
1326 #define ENDFILE_LINUX_SPEC "\
1327 %{mnewlib: ecrtn.o%s} \
1328 %{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
1329 #endif
1330
1331 #ifndef LINK_START_LINUX_SPEC
1332 #define LINK_START_LINUX_SPEC "-Ttext 0x400074"
1333 #endif
1334
1335 #ifndef LINK_OS_LINUX_SPEC
1336 #define LINK_OS_LINUX_SPEC ""
1337 #endif
1338
1339 #ifndef CPP_OS_LINUX_SPEC
1340 #ifdef USE_GNULIBC_1
1341 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__linux__ \
1342 %{!undef:%{!ansi:%{!std=*:-Dunix -Dlinux}%{std=gnu*:-Dunix -Dlinux}}} \
1343 -Asystem(unix) -Asystem(posix)"
1344 #else
1345 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__linux__ \
1346 %{!undef:%{!ansi:%{!std=*:-Dunix -Dlinux}%{std=gnu*:-Dunix -Dlinux}}} \
1347 -Asystem(unix) -Asystem(posix) %{pthread:-D_REENTRANT}"
1348 #endif
1349 #endif
1350
1351 /* Solaris support.  */
1352 /* For Solaris, Gcc automatically adds in one of the files
1353    /usr/ccs/lib/values-Xc.o, /usr/ccs/lib/values-Xa.o, or
1354    /usr/ccs/lib/values-Xt.o for each final link step (depending upon the other
1355    gcc options selected, such as -traditional and -ansi).  These files each
1356    contain one (initialized) copy of a special variable called `_lib_version'.
1357    Each one of these files has `_lib_version' initialized to a different (enum)
1358    value.  The SVR4 library routines query the value of `_lib_version' at run
1359    to decide how they should behave.  Specifically, they decide (based upon the
1360    value of `_lib_version') if they will act in a strictly ANSI conforming
1361    manner or not.  */
1362
1363 #ifndef LIB_SOLARIS_SPEC
1364 #define LIB_SOLARIS_SPEC "\
1365 %{mnewlib: --start-group -lsolaris -lc --end-group } \
1366 %{!mnewlib: \
1367     %{ansi:values-Xc.o%s} \
1368     %{!ansi: \
1369         %{traditional:values-Xt.o%s} \
1370         %{!traditional:values-Xa.o%s}} \
1371         %{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
1372     %{solaris-cclib: /opt/SUNWspro/SC4.0/lib/libabi.a} \
1373     %{!shared: %{!symbolic: -lc }}}"
1374 #endif
1375
1376 #ifndef STARTFILE_SOLARIS_SPEC
1377 #define STARTFILE_SOLARIS_SPEC "\
1378 %{!msolaris-cclib: scrti.o%s scrt0.o%s} \
1379 %{msolaris-cclib: /opt/SUNWspro/SC4.0/lib/crti.o%s /opt/SUNWspro/SC4.0/lib/crt1.o%s}"
1380 #endif
1381
1382 #ifndef ENDFILE_SOLARIS_SPEC
1383 #define ENDFILE_SOLARIS_SPEC "\
1384 %{!msolaris-cclib: scrtn.o%s} \
1385 %{msolaris-cclib: /opt/SUNWspro/SC4.0/lib/crtn.o%s}"
1386 #endif
1387
1388 #ifndef LINK_START_SOLARIS_SPEC
1389 #ifdef CROSS_COMPILER
1390 #define LINK_START_SOLARIS_SPEC "-Ttext 0x2000074"
1391 #else
1392 #define LINK_START_SOLARIS_SPEC ""
1393 #endif
1394 #endif
1395
1396 #ifndef LINK_OS_SOLARIS_SPEC
1397 #define LINK_OS_SOLARIS_SPEC ""
1398 #endif
1399
1400 #ifndef CPP_OS_SOLARIS_SPEC
1401 #define CPP_OS_SOLARIS_SPEC "-D__ppc -D__sun__=1 -D__unix__ -D__svr4__  -D__SVR4__ \
1402 %{!undef:%{!ansi:%{!std=*:-Dsun=1 -Dunix -DSVR4 -D__EXTENSIONS__} \
1403                %{std=gnu*:-Dsun=1 -Dunix -DSVR4 -D__EXTENSIONS__}}} \
1404 -Amachine(prep)"
1405 #endif
1406
1407 /* Define any extra SPECS that the compiler needs to generate.  */
1408 #undef  SUBTARGET_EXTRA_SPECS
1409 #define SUBTARGET_EXTRA_SPECS                                           \
1410   { "lib_ads",                  LIB_ADS_SPEC },                         \
1411   { "lib_yellowknife",          LIB_YELLOWKNIFE_SPEC },                 \
1412   { "lib_mvme",                 LIB_MVME_SPEC },                        \
1413   { "lib_sim",                  LIB_SIM_SPEC },                         \
1414   { "lib_linux",                LIB_LINUX_SPEC },                       \
1415   { "lib_solaris",              LIB_SOLARIS_SPEC },                     \
1416   { "lib_default",              LIB_DEFAULT_SPEC },                     \
1417   { "startfile_ads",            STARTFILE_ADS_SPEC },                   \
1418   { "startfile_yellowknife",    STARTFILE_YELLOWKNIFE_SPEC },           \
1419   { "startfile_mvme",           STARTFILE_MVME_SPEC },                  \
1420   { "startfile_sim",            STARTFILE_SIM_SPEC },                   \
1421   { "startfile_linux",          STARTFILE_LINUX_SPEC },                 \
1422   { "startfile_solaris",        STARTFILE_SOLARIS_SPEC },               \
1423   { "startfile_default",        STARTFILE_DEFAULT_SPEC },               \
1424   { "endfile_ads",              ENDFILE_ADS_SPEC },                     \
1425   { "endfile_yellowknife",      ENDFILE_YELLOWKNIFE_SPEC },             \
1426   { "endfile_mvme",             ENDFILE_MVME_SPEC },                    \
1427   { "endfile_sim",              ENDFILE_SIM_SPEC },                     \
1428   { "endfile_linux",            ENDFILE_LINUX_SPEC },                   \
1429   { "endfile_solaris",          ENDFILE_SOLARIS_SPEC },                 \
1430   { "endfile_default",          ENDFILE_DEFAULT_SPEC },                 \
1431   { "link_path",                LINK_PATH_SPEC },                       \
1432   { "link_shlib",               LINK_SHLIB_SPEC },                      \
1433   { "link_target",              LINK_TARGET_SPEC },                     \
1434   { "link_start",               LINK_START_SPEC },                      \
1435   { "link_start_ads",           LINK_START_ADS_SPEC },                  \
1436   { "link_start_yellowknife",   LINK_START_YELLOWKNIFE_SPEC },          \
1437   { "link_start_mvme",          LINK_START_MVME_SPEC },                 \
1438   { "link_start_sim",           LINK_START_SIM_SPEC },                  \
1439   { "link_start_linux",         LINK_START_LINUX_SPEC },                \
1440   { "link_start_solaris",       LINK_START_SOLARIS_SPEC },              \
1441   { "link_start_default",       LINK_START_DEFAULT_SPEC },              \
1442   { "link_os",                  LINK_OS_SPEC },                         \
1443   { "link_os_ads",              LINK_OS_ADS_SPEC },                     \
1444   { "link_os_yellowknife",      LINK_OS_YELLOWKNIFE_SPEC },             \
1445   { "link_os_mvme",             LINK_OS_MVME_SPEC },                    \
1446   { "link_os_sim",              LINK_OS_SIM_SPEC },                     \
1447   { "link_os_linux",            LINK_OS_LINUX_SPEC },                   \
1448   { "link_os_solaris",          LINK_OS_SOLARIS_SPEC },                 \
1449   { "link_os_default",          LINK_OS_DEFAULT_SPEC },                 \
1450   { "cc1_endian_big",           CC1_ENDIAN_BIG_SPEC },                  \
1451   { "cc1_endian_little",        CC1_ENDIAN_LITTLE_SPEC },               \
1452   { "cc1_endian_default",       CC1_ENDIAN_DEFAULT_SPEC },              \
1453   { "cpp_endian_big",           CPP_ENDIAN_BIG_SPEC },                  \
1454   { "cpp_endian_little",        CPP_ENDIAN_LITTLE_SPEC },               \
1455   { "cpp_endian_solaris",       CPP_ENDIAN_SOLARIS_SPEC },              \
1456   { "cpp_os_ads",               CPP_OS_ADS_SPEC },                      \
1457   { "cpp_os_yellowknife",       CPP_OS_YELLOWKNIFE_SPEC },              \
1458   { "cpp_os_mvme",              CPP_OS_MVME_SPEC },                     \
1459   { "cpp_os_sim",               CPP_OS_SIM_SPEC },                      \
1460   { "cpp_os_linux",             CPP_OS_LINUX_SPEC },                    \
1461   { "cpp_os_solaris",           CPP_OS_SOLARIS_SPEC },                  \
1462   { "cpp_os_default",           CPP_OS_DEFAULT_SPEC },
1463
1464 /* Define this macro as a C expression for the initializer of an
1465    array of string to tell the driver program which options are
1466    defaults for this target and thus do not need to be handled
1467    specially when using `MULTILIB_OPTIONS'.
1468
1469    Do not define this macro if `MULTILIB_OPTIONS' is not defined in
1470    the target makefile fragment or if none of the options listed in
1471    `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
1472
1473 #undef  MULTILIB_DEFAULTS
1474 #define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
1475
1476 /* Define this macro if the code for function profiling should come
1477    before the function prologue.  Normally, the profiling code comes
1478    after.  */
1479 #define PROFILE_BEFORE_PROLOGUE 1
1480
1481 /* Function name to call to do profiling.  */
1482 #undef  RS6000_MCOUNT
1483 #define RS6000_MCOUNT "_mcount"