]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/rs6000/sysv4.h
sysv4.h (SHARED_LIB_SUPPORT): Remove conditional.
[thirdparty/gcc.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, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 Free Software Foundation, Inc.
5 Contributed by Cygnus Support.
6
7 This file is part of GCC.
8
9 GCC is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 3, or (at your
12 option) any later version.
13
14 GCC is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
18
19 Under Section 7 of GPL version 3, you are granted additional
20 permissions described in the GCC Runtime Library Exception, version
21 3.1, as published by the Free Software Foundation.
22
23 You should have received a copy of the GNU General Public License and
24 a copy of the GCC Runtime Library Exception along with this program;
25 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
26 <http://www.gnu.org/licenses/>. */
27
28 /* Header files should be C++ aware in general. */
29 #undef NO_IMPLICIT_EXTERN_C
30 #define NO_IMPLICIT_EXTERN_C
31
32 /* Yes! We are ELF. */
33 #define TARGET_OBJECT_FORMAT OBJECT_ELF
34
35 /* Default ABI to compile code for. */
36 #define DEFAULT_ABI rs6000_current_abi
37
38 /* Default ABI to use. */
39 #define RS6000_ABI_NAME "sysv"
40
41 /* Override rs6000.h definition. */
42 #undef ASM_DEFAULT_SPEC
43 #define ASM_DEFAULT_SPEC "-mppc"
44
45 #define TARGET_TOC ((target_flags & MASK_64BIT) \
46 || ((target_flags & (MASK_RELOCATABLE \
47 | MASK_MINIMAL_TOC)) \
48 && flag_pic > 1) \
49 || DEFAULT_ABI == ABI_AIX)
50
51 #define TARGET_BITFIELD_TYPE (! TARGET_NO_BITFIELD_TYPE)
52 #define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
53 #define TARGET_PROTOTYPE target_prototype
54 #define TARGET_NO_PROTOTYPE (! TARGET_PROTOTYPE)
55 #define TARGET_NO_TOC (! TARGET_TOC)
56 #define TARGET_NO_EABI (! TARGET_EABI)
57 #define TARGET_REGNAMES rs6000_regnames
58
59 #ifdef HAVE_AS_REL16
60 #undef TARGET_SECURE_PLT
61 #define TARGET_SECURE_PLT secure_plt
62 #endif
63
64 #define SDATA_DEFAULT_SIZE 8
65
66 /* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
67 get control in TARGET_OPTION_OVERRIDE. */
68
69 #define SUBTARGET_OVERRIDE_OPTIONS \
70 do { \
71 if (!global_options_set.x_g_switch_value) \
72 g_switch_value = SDATA_DEFAULT_SIZE; \
73 \
74 if (rs6000_abi_name == NULL) \
75 rs6000_abi_name = RS6000_ABI_NAME; \
76 \
77 if (!strcmp (rs6000_abi_name, "sysv")) \
78 rs6000_current_abi = ABI_V4; \
79 else if (!strcmp (rs6000_abi_name, "sysv-noeabi")) \
80 { \
81 rs6000_current_abi = ABI_V4; \
82 target_flags &= ~ MASK_EABI; \
83 } \
84 else if (!strcmp (rs6000_abi_name, "sysv-eabi") \
85 || !strcmp (rs6000_abi_name, "eabi")) \
86 { \
87 rs6000_current_abi = ABI_V4; \
88 target_flags |= MASK_EABI; \
89 } \
90 else if (!strcmp (rs6000_abi_name, "aixdesc")) \
91 rs6000_current_abi = ABI_AIX; \
92 else if (!strcmp (rs6000_abi_name, "freebsd")) \
93 rs6000_current_abi = ABI_V4; \
94 else if (!strcmp (rs6000_abi_name, "linux")) \
95 { \
96 if (TARGET_64BIT) \
97 rs6000_current_abi = ABI_AIX; \
98 else \
99 rs6000_current_abi = ABI_V4; \
100 } \
101 else if (!strcmp (rs6000_abi_name, "gnu")) \
102 rs6000_current_abi = ABI_V4; \
103 else if (!strcmp (rs6000_abi_name, "netbsd")) \
104 rs6000_current_abi = ABI_V4; \
105 else if (!strcmp (rs6000_abi_name, "openbsd")) \
106 rs6000_current_abi = ABI_V4; \
107 else if (!strcmp (rs6000_abi_name, "i960-old")) \
108 { \
109 rs6000_current_abi = ABI_V4; \
110 target_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI); \
111 target_flags &= ~MASK_STRICT_ALIGN; \
112 TARGET_NO_BITFIELD_WORD = 1; \
113 } \
114 else \
115 { \
116 rs6000_current_abi = ABI_V4; \
117 error ("bad value for -mcall-%s", rs6000_abi_name); \
118 } \
119 \
120 if (rs6000_sdata_name) \
121 { \
122 if (!strcmp (rs6000_sdata_name, "none")) \
123 rs6000_sdata = SDATA_NONE; \
124 else if (!strcmp (rs6000_sdata_name, "data")) \
125 rs6000_sdata = SDATA_DATA; \
126 else if (!strcmp (rs6000_sdata_name, "default")) \
127 rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV; \
128 else if (!strcmp (rs6000_sdata_name, "sysv")) \
129 rs6000_sdata = SDATA_SYSV; \
130 else if (!strcmp (rs6000_sdata_name, "eabi")) \
131 rs6000_sdata = SDATA_EABI; \
132 else \
133 error ("bad value for -msdata=%s", rs6000_sdata_name); \
134 } \
135 else if (DEFAULT_ABI == ABI_V4) \
136 { \
137 rs6000_sdata = SDATA_DATA; \
138 rs6000_sdata_name = "data"; \
139 } \
140 else \
141 { \
142 rs6000_sdata = SDATA_NONE; \
143 rs6000_sdata_name = "none"; \
144 } \
145 \
146 if (TARGET_RELOCATABLE && \
147 (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
148 { \
149 rs6000_sdata = SDATA_DATA; \
150 error ("-mrelocatable and -msdata=%s are incompatible", \
151 rs6000_sdata_name); \
152 } \
153 \
154 else if (flag_pic && DEFAULT_ABI != ABI_AIX \
155 && (rs6000_sdata == SDATA_EABI \
156 || rs6000_sdata == SDATA_SYSV)) \
157 { \
158 rs6000_sdata = SDATA_DATA; \
159 error ("-f%s and -msdata=%s are incompatible", \
160 (flag_pic > 1) ? "PIC" : "pic", \
161 rs6000_sdata_name); \
162 } \
163 \
164 if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4) \
165 || (rs6000_sdata == SDATA_EABI && !TARGET_EABI)) \
166 { \
167 rs6000_sdata = SDATA_NONE; \
168 error ("-msdata=%s and -mcall-%s are incompatible", \
169 rs6000_sdata_name, rs6000_abi_name); \
170 } \
171 \
172 targetm.have_srodata_section = rs6000_sdata == SDATA_EABI; \
173 \
174 if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC) \
175 { \
176 target_flags |= MASK_MINIMAL_TOC; \
177 error ("-mrelocatable and -mno-minimal-toc are incompatible"); \
178 } \
179 \
180 if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX) \
181 { \
182 target_flags &= ~MASK_RELOCATABLE; \
183 error ("-mrelocatable and -mcall-%s are incompatible", \
184 rs6000_abi_name); \
185 } \
186 \
187 if (!TARGET_64BIT && flag_pic > 1 && rs6000_current_abi == ABI_AIX) \
188 { \
189 flag_pic = 0; \
190 error ("-fPIC and -mcall-%s are incompatible", \
191 rs6000_abi_name); \
192 } \
193 \
194 if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN) \
195 { \
196 target_flags &= ~MASK_LITTLE_ENDIAN; \
197 error ("-mcall-aixdesc must be big endian"); \
198 } \
199 \
200 if (TARGET_SECURE_PLT != secure_plt) \
201 { \
202 error ("-msecure-plt not supported by your assembler"); \
203 } \
204 \
205 /* Treat -fPIC the same as -mrelocatable. */ \
206 if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX) \
207 { \
208 target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC; \
209 TARGET_NO_FP_IN_TOC = 1; \
210 } \
211 \
212 else if (TARGET_RELOCATABLE) \
213 if (!flag_pic) \
214 flag_pic = 2; \
215 } while (0)
216
217 #ifndef RS6000_BI_ARCH
218 # define SUBSUBTARGET_OVERRIDE_OPTIONS \
219 do { \
220 if ((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
221 error ("-m%s not supported in this configuration", \
222 (target_flags & MASK_64BIT) ? "64" : "32"); \
223 } while (0)
224 #endif
225
226 /* Override rs6000.h definition. */
227 #undef TARGET_DEFAULT
228 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
229
230 /* Override rs6000.h definition. */
231 #undef PROCESSOR_DEFAULT
232 #define PROCESSOR_DEFAULT PROCESSOR_PPC750
233
234 /* SVR4 only defined for PowerPC, so short-circuit POWER patterns. */
235 #undef TARGET_POWER
236 #define TARGET_POWER 0
237
238 #define FIXED_R2 1
239 /* System V.4 uses register 13 as a pointer to the small data area,
240 so it is not available to the normal user. */
241 #define FIXED_R13 1
242
243 /* Override default big endianism definitions in rs6000.h. */
244 #undef BYTES_BIG_ENDIAN
245 #undef WORDS_BIG_ENDIAN
246 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
247 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
248
249 /* Define cutoff for using external functions to save floating point.
250 When optimizing for size, use external functions when profitable. */
251 #define FP_SAVE_INLINE(FIRST_REG) (optimize_size \
252 ? ((FIRST_REG) == 62 \
253 || (FIRST_REG) == 63) \
254 : (FIRST_REG) < 64)
255 /* And similarly for general purpose registers. */
256 #define GP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 32 \
257 && !optimize_size)
258
259 /* Put jump tables in read-only memory, rather than in .text. */
260 #define JUMP_TABLES_IN_TEXT_SECTION 0
261
262 /* Prefix and suffix to use to saving floating point. */
263 #define SAVE_FP_PREFIX "_savefpr_"
264 #define SAVE_FP_SUFFIX ""
265
266 /* Prefix and suffix to use to restoring floating point. */
267 #define RESTORE_FP_PREFIX "_restfpr_"
268 #define RESTORE_FP_SUFFIX ""
269
270 /* Type used for size_t, as a string used in a declaration. */
271 #undef SIZE_TYPE
272 #define SIZE_TYPE "unsigned int"
273
274 /* Type used for ptrdiff_t, as a string used in a declaration. */
275 #define PTRDIFF_TYPE "int"
276
277 #undef WCHAR_TYPE
278 #define WCHAR_TYPE "long int"
279
280 #undef WCHAR_TYPE_SIZE
281 #define WCHAR_TYPE_SIZE 32
282
283 /* Make int foo : 8 not cause structures to be aligned to an int boundary. */
284 /* Override elfos.h definition. */
285 #undef PCC_BITFIELD_TYPE_MATTERS
286 #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
287
288 #undef BITFIELD_NBYTES_LIMITED
289 #define BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)
290
291 /* Define this macro to be the value 1 if instructions will fail to
292 work if given data not on the nominal alignment. If instructions
293 will merely go slower in that case, define this macro as 0. */
294 #undef STRICT_ALIGNMENT
295 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
296
297 /* Define this macro if you wish to preserve a certain alignment for
298 the stack pointer, greater than what the hardware enforces. The
299 definition is a C expression for the desired alignment (measured
300 in bits). This macro must evaluate to a value equal to or larger
301 than STACK_BOUNDARY.
302 For the SYSV ABI and variants the alignment of the stack pointer
303 is usually controlled manually in rs6000.c. However, to maintain
304 alignment across alloca () in all circumstances,
305 PREFERRED_STACK_BOUNDARY needs to be set as well.
306 This has the additional advantage of allowing a bigger maximum
307 alignment of user objects on the stack. */
308
309 #undef PREFERRED_STACK_BOUNDARY
310 #define PREFERRED_STACK_BOUNDARY 128
311
312 /* Real stack boundary as mandated by the appropriate ABI. */
313 #define ABI_STACK_BOUNDARY \
314 ((TARGET_EABI && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI) ? 64 : 128)
315
316 /* An expression for the alignment of a structure field FIELD if the
317 alignment computed in the usual way is COMPUTED. */
318 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
319 ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
320 ? 128 : COMPUTED)
321
322 #undef BIGGEST_FIELD_ALIGNMENT
323
324 /* Use ELF style section commands. */
325
326 #define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
327
328 #define DATA_SECTION_ASM_OP "\t.section\t\".data\""
329
330 #define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
331
332 /* Override elfos.h definition. */
333 #undef INIT_SECTION_ASM_OP
334 #define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
335
336 /* Override elfos.h definition. */
337 #undef FINI_SECTION_ASM_OP
338 #define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
339
340 #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
341
342 /* Put PC relative got entries in .got2. */
343 #define MINIMAL_TOC_SECTION_ASM_OP \
344 (TARGET_RELOCATABLE || (flag_pic && DEFAULT_ABI != ABI_AIX) \
345 ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
346
347 #define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
348 #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
349 #define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"
350
351 /* Override default elf definitions. */
352 #define TARGET_ASM_INIT_SECTIONS rs6000_elf_asm_init_sections
353 #undef TARGET_ASM_RELOC_RW_MASK
354 #define TARGET_ASM_RELOC_RW_MASK rs6000_elf_reloc_rw_mask
355 #undef TARGET_ASM_SELECT_RTX_SECTION
356 #define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section
357
358 /* Return nonzero if this entry is to be written into the constant pool
359 in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
360 containing one of them. If -mfp-in-toc (the default), we also do
361 this for floating-point constants. We actually can only do this
362 if the FP formats of the target and host machines are the same, but
363 we can't check that since not every file that uses these target macros
364 includes real.h.
365
366 Unlike AIX, we don't key off of -mminimal-toc, but instead do not
367 allow floating point constants in the TOC if -mrelocatable. */
368
369 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
370 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
371 (TARGET_TOC \
372 && (GET_CODE (X) == SYMBOL_REF \
373 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
374 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
375 || GET_CODE (X) == LABEL_REF \
376 || (GET_CODE (X) == CONST_INT \
377 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
378 || (!TARGET_NO_FP_IN_TOC \
379 && !TARGET_RELOCATABLE \
380 && GET_CODE (X) == CONST_DOUBLE \
381 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
382 && BITS_PER_WORD == HOST_BITS_PER_INT)))
383
384 /* These macros generate the special .type and .size directives which
385 are used to set the corresponding fields of the linker symbol table
386 entries in an ELF object file under SVR4. These macros also output
387 the starting labels for the relevant functions/objects. */
388
389 /* Write the extra assembler code needed to declare a function properly.
390 Some svr4 assemblers need to also have something extra said about the
391 function's return value. We allow for that here. */
392
393 /* Override elfos.h definition. */
394 #undef ASM_DECLARE_FUNCTION_NAME
395 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
396 rs6000_elf_declare_function_name ((FILE), (NAME), (DECL))
397
398 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore
399 flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */
400
401 #define LOCAL_LABEL_PREFIX "."
402 #define USER_LABEL_PREFIX ""
403
404 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
405 asm_fprintf (FILE, "%L%s", PREFIX)
406
407 /* Globalizing directive for a label. */
408 #define GLOBAL_ASM_OP "\t.globl "
409
410 /* This says how to output assembler code to declare an
411 uninitialized internal linkage data object. Under SVR4,
412 the linker seems to want the alignment of data objects
413 to depend on their types. We do exactly that here. */
414
415 #define LOCAL_ASM_OP "\t.local\t"
416
417 #define LCOMM_ASM_OP "\t.lcomm\t"
418
419 /* Describe how to emit uninitialized local items. */
420 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
421 do { \
422 if ((DECL) && rs6000_elf_in_small_data_p (DECL)) \
423 { \
424 switch_to_section (sbss_section); \
425 ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
426 ASM_OUTPUT_LABEL (FILE, NAME); \
427 ASM_OUTPUT_SKIP (FILE, SIZE); \
428 if (!flag_inhibit_size_directive && (SIZE) > 0) \
429 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
430 } \
431 else \
432 { \
433 fprintf (FILE, "%s", LCOMM_ASM_OP); \
434 assemble_name ((FILE), (NAME)); \
435 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
436 (SIZE), (ALIGN) / BITS_PER_UNIT); \
437 } \
438 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
439 } while (0)
440
441 /* Describe how to emit uninitialized external linkage items. */
442 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
443 do { \
444 ASM_OUTPUT_ALIGNED_DECL_LOCAL (FILE, DECL, NAME, SIZE, ALIGN); \
445 } while (0)
446
447 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
448 /* To support -falign-* switches we need to use .p2align so
449 that alignment directives in code sections will be padded
450 with no-op instructions, rather than zeroes. */
451 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
452 if ((LOG) != 0) \
453 { \
454 if ((MAX_SKIP) == 0) \
455 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
456 else \
457 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
458 }
459 #endif
460
461 /* This is how to output code to push a register on the stack.
462 It need not be very fast code.
463
464 On the rs6000, we must keep the backchain up to date. In order
465 to simplify things, always allocate 16 bytes for a push (System V
466 wants to keep stack aligned to a 16 byte boundary). */
467
468 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \
469 do { \
470 if (DEFAULT_ABI == ABI_V4) \
471 asm_fprintf (FILE, \
472 "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,12(%s)\n", \
473 reg_names[1], reg_names[1], reg_names[REGNO], \
474 reg_names[1]); \
475 } while (0)
476
477 /* This is how to output an insn to pop a register from the stack.
478 It need not be very fast code. */
479
480 #define ASM_OUTPUT_REG_POP(FILE, REGNO) \
481 do { \
482 if (DEFAULT_ABI == ABI_V4) \
483 asm_fprintf (FILE, \
484 "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n", \
485 reg_names[REGNO], reg_names[1], reg_names[1], \
486 reg_names[1]); \
487 } while (0)
488
489 extern int fixuplabelno;
490
491 /* Handle constructors specially for -mrelocatable. */
492 #define TARGET_ASM_CONSTRUCTOR rs6000_elf_asm_out_constructor
493 #define TARGET_ASM_DESTRUCTOR rs6000_elf_asm_out_destructor
494
495 /* This is the end of what might become sysv4.h. */
496
497 /* Use DWARF 2 debugging information by default. */
498 #undef PREFERRED_DEBUGGING_TYPE
499 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
500
501 /* Historically we have also supported stabs debugging. */
502 #define DBX_DEBUGGING_INFO 1
503
504 #define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info
505 #define TARGET_IN_SMALL_DATA_P rs6000_elf_in_small_data_p
506
507 /* The ELF version doesn't encode [DS] or whatever at the end of symbols. */
508
509 #define RS6000_OUTPUT_BASENAME(FILE, NAME) \
510 assemble_name (FILE, NAME)
511
512 /* We have to output the stabs for the function name *first*, before
513 outputting its label. */
514
515 #define DBX_FUNCTION_FIRST
516
517 /* This is the end of what might become sysv4dbx.h. */
518
519 #ifndef TARGET_VERSION
520 #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
521 #endif
522 \f
523 #define TARGET_OS_SYSV_CPP_BUILTINS() \
524 do \
525 { \
526 if (target_flags_explicit \
527 & MASK_RELOCATABLE) \
528 builtin_define ("_RELOCATABLE"); \
529 } \
530 while (0)
531
532 #ifndef TARGET_OS_CPP_BUILTINS
533 #define TARGET_OS_CPP_BUILTINS() \
534 do \
535 { \
536 builtin_define_std ("PPC"); \
537 builtin_define_std ("unix"); \
538 builtin_define ("__svr4__"); \
539 builtin_assert ("system=unix"); \
540 builtin_assert ("system=svr4"); \
541 builtin_assert ("cpu=powerpc"); \
542 builtin_assert ("machine=powerpc"); \
543 TARGET_OS_SYSV_CPP_BUILTINS (); \
544 } \
545 while (0)
546 #endif
547
548 #undef ASM_SPEC
549 #define ASM_SPEC "%(asm_cpu) \
550 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
551 %{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \
552 %{memb|msdata=eabi: -memb} \
553 %{mlittle|mlittle-endian:-mlittle; \
554 mbig|mbig-endian :-mbig; \
555 mcall-aixdesc | \
556 mcall-freebsd | \
557 mcall-netbsd | \
558 mcall-openbsd | \
559 mcall-linux | \
560 mcall-gnu :-mbig; \
561 mcall-i960-old :-mlittle}"
562
563 #define CC1_ENDIAN_BIG_SPEC ""
564
565 #define CC1_ENDIAN_LITTLE_SPEC "\
566 %{!mstrict-align: %{!mno-strict-align: \
567 %{!mcall-i960-old: \
568 -mstrict-align \
569 } \
570 }}"
571
572 #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"
573
574 #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
575 #define CC1_SECURE_PLT_DEFAULT_SPEC ""
576 #endif
577
578 /* Pass -G xxx to the compiler and set correct endian mode. */
579 #define CC1_SPEC "%{G*} %(cc1_cpu) \
580 %{mlittle|mlittle-endian: %(cc1_endian_little); \
581 mbig |mbig-endian : %(cc1_endian_big); \
582 mcall-aixdesc | \
583 mcall-freebsd | \
584 mcall-netbsd | \
585 mcall-openbsd | \
586 mcall-linux | \
587 mcall-gnu : -mbig %(cc1_endian_big); \
588 mcall-i960-old : -mlittle %(cc1_endian_little); \
589 : %(cc1_endian_default)} \
590 %{meabi: %{!mcall-*: -mcall-sysv }} \
591 %{!meabi: %{!mno-eabi: \
592 %{mrelocatable: -meabi } \
593 %{mcall-freebsd: -mno-eabi } \
594 %{mcall-i960-old: -meabi } \
595 %{mcall-linux: -mno-eabi } \
596 %{mcall-gnu: -mno-eabi } \
597 %{mcall-netbsd: -mno-eabi } \
598 %{mcall-openbsd: -mno-eabi }}} \
599 %{msdata: -msdata=default} \
600 %{mno-sdata: -msdata=none} \
601 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
602 %{profile: -p}"
603
604 /* Don't put -Y P,<path> for cross compilers. */
605 #ifndef CROSS_DIRECTORY_STRUCTURE
606 #define LINK_PATH_SPEC "\
607 %{!R*:%{L*:-R %*}} \
608 %{!nostdlib: %{!YP,*: \
609 %{compat-bsd: \
610 %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
611 %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
612 %{!R*: %{!L*: -R /usr/ucblib}} \
613 %{!compat-bsd: \
614 %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
615 %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
616
617 #else
618 #define LINK_PATH_SPEC ""
619 #endif
620
621 /* Default starting address if specified. */
622 #define LINK_START_SPEC "\
623 %{mads : %(link_start_ads) ; \
624 myellowknife : %(link_start_yellowknife) ; \
625 mmvme : %(link_start_mvme) ; \
626 msim : %(link_start_sim) ; \
627 mcall-freebsd: %(link_start_freebsd) ; \
628 mcall-linux : %(link_start_linux) ; \
629 mcall-gnu : %(link_start_gnu) ; \
630 mcall-netbsd : %(link_start_netbsd) ; \
631 mcall-openbsd: %(link_start_openbsd) ; \
632 : %(link_start_default) }"
633
634 #define LINK_START_DEFAULT_SPEC ""
635
636 #undef LINK_SPEC
637 #define LINK_SPEC "\
638 %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
639 %{YP,*} %{R*} \
640 %{Qy:} %{!Qn:-Qy} \
641 %(link_shlib) \
642 %{!T*: %(link_start) } \
643 %(link_target) \
644 %(link_os)"
645
646 /* Shared libraries are not default. */
647 #define LINK_SHLIB_SPEC "\
648 %{mshlib: %(link_path) } \
649 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
650 %{static: } \
651 %{shared:-G -dy -z text %(link_path) } \
652 %{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
653
654 /* Override the default target of the linker. */
655 #define LINK_TARGET_SPEC "\
656 %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \
657 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
658 %{mcall-i960-old: --oformat elf32-powerpcle} \
659 }}}}"
660
661 /* Any specific OS flags. */
662 #define LINK_OS_SPEC "\
663 %{mads : %(link_os_ads) ; \
664 myellowknife : %(link_os_yellowknife) ; \
665 mmvme : %(link_os_mvme) ; \
666 msim : %(link_os_sim) ; \
667 mcall-freebsd: %(link_os_freebsd) ; \
668 mcall-linux : %(link_os_linux) ; \
669 mcall-gnu : %(link_os_gnu) ; \
670 mcall-netbsd : %(link_os_netbsd) ; \
671 mcall-openbsd: %(link_os_openbsd) ; \
672 : %(link_os_default) }"
673
674 #define LINK_OS_DEFAULT_SPEC ""
675
676 #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
677 %<msingle-float %<mdouble-float}"
678
679 /* Override rs6000.h definition. */
680 #undef CPP_SPEC
681 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
682 %{mads : %(cpp_os_ads) ; \
683 myellowknife : %(cpp_os_yellowknife) ; \
684 mmvme : %(cpp_os_mvme) ; \
685 msim : %(cpp_os_sim) ; \
686 mcall-freebsd: %(cpp_os_freebsd) ; \
687 mcall-linux : %(cpp_os_linux) ; \
688 mcall-gnu : %(cpp_os_gnu) ; \
689 mcall-netbsd : %(cpp_os_netbsd) ; \
690 mcall-openbsd: %(cpp_os_openbsd) ; \
691 : %(cpp_os_default) }"
692
693 #define CPP_OS_DEFAULT_SPEC ""
694
695 #undef STARTFILE_SPEC
696 #define STARTFILE_SPEC "\
697 %{mads : %(startfile_ads) ; \
698 myellowknife : %(startfile_yellowknife) ; \
699 mmvme : %(startfile_mvme) ; \
700 msim : %(startfile_sim) ; \
701 mcall-freebsd: %(startfile_freebsd) ; \
702 mcall-linux : %(startfile_linux) ; \
703 mcall-gnu : %(startfile_gnu) ; \
704 mcall-netbsd : %(startfile_netbsd) ; \
705 mcall-openbsd: %(startfile_openbsd) ; \
706 : %(startfile_default) }"
707
708 #define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s"
709
710 #undef LIB_SPEC
711 #define LIB_SPEC "\
712 %{mads : %(lib_ads) ; \
713 myellowknife : %(lib_yellowknife) ; \
714 mmvme : %(lib_mvme) ; \
715 msim : %(lib_sim) ; \
716 mcall-freebsd: %(lib_freebsd) ; \
717 mcall-linux : %(lib_linux) ; \
718 mcall-gnu : %(lib_gnu) ; \
719 mcall-netbsd : %(lib_netbsd) ; \
720 mcall-openbsd: %(lib_openbsd) ; \
721 : %(lib_default) }"
722
723 #define LIB_DEFAULT_SPEC "-lc"
724
725 #undef ENDFILE_SPEC
726 #define ENDFILE_SPEC "\
727 %{mads : %(endfile_ads) ; \
728 myellowknife : %(endfile_yellowknife) ; \
729 mmvme : %(endfile_mvme) ; \
730 msim : %(endfile_sim) ; \
731 mcall-freebsd: %(endfile_freebsd) ; \
732 mcall-linux : %(endfile_linux) ; \
733 mcall-gnu : %(endfile_gnu) ; \
734 mcall-netbsd : %(endfile_netbsd) ; \
735 mcall-openbsd: %(endfile_openbsd) ; \
736 : %(crtsavres_default) %(endfile_default) }"
737
738 #define CRTSAVRES_DEFAULT_SPEC ""
739
740 #define ENDFILE_DEFAULT_SPEC "crtend.o%s ecrtn.o%s"
741
742 /* Motorola ADS support. */
743 #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
744
745 #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
746
747 #define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
748
749 #define LINK_START_ADS_SPEC "-T ads.ld%s"
750
751 #define LINK_OS_ADS_SPEC ""
752
753 #define CPP_OS_ADS_SPEC ""
754
755 /* Motorola Yellowknife support. */
756 #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
757
758 #define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
759
760 #define ENDFILE_YELLOWKNIFE_SPEC "crtend.o%s ecrtn.o%s"
761
762 #define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
763
764 #define LINK_OS_YELLOWKNIFE_SPEC ""
765
766 #define CPP_OS_YELLOWKNIFE_SPEC ""
767
768 /* Motorola MVME support. */
769 #define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
770
771 #define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
772
773 #define ENDFILE_MVME_SPEC "crtend.o%s ecrtn.o%s"
774
775 #define LINK_START_MVME_SPEC "-Ttext 0x40000"
776
777 #define LINK_OS_MVME_SPEC ""
778
779 #define CPP_OS_MVME_SPEC ""
780
781 /* PowerPC simulator based on netbsd system calls support. */
782 #define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
783
784 #define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s crtbegin.o%s"
785
786 #define ENDFILE_SIM_SPEC "crtend.o%s ecrtn.o%s"
787
788 #define LINK_START_SIM_SPEC ""
789
790 #define LINK_OS_SIM_SPEC "-m elf32ppcsim"
791
792 #define CPP_OS_SIM_SPEC ""
793
794 /* FreeBSD support. */
795
796 #define CPP_OS_FREEBSD_SPEC "\
797 -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
798 -Acpu=powerpc -Amachine=powerpc"
799
800 #define STARTFILE_FREEBSD_SPEC FBSD_STARTFILE_SPEC
801 #define ENDFILE_FREEBSD_SPEC FBSD_ENDFILE_SPEC
802 #define LIB_FREEBSD_SPEC FBSD_LIB_SPEC
803 #define LINK_START_FREEBSD_SPEC ""
804
805 #define LINK_OS_FREEBSD_SPEC "\
806 %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
807 %{v:-V} \
808 %{assert*} %{R*} %{rpath*} %{defsym*} \
809 %{shared:-Bshareable %{h*} %{soname*}} \
810 %{!shared: \
811 %{!static: \
812 %{rdynamic: -export-dynamic} \
813 -dynamic-linker %(fbsd_dynamic_linker) } \
814 %{static:-Bstatic}} \
815 %{symbolic:-Bsymbolic}"
816
817 /* GNU/Linux support. */
818 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
819 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
820 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
821
822 #ifdef HAVE_LD_PIE
823 #define STARTFILE_LINUX_SPEC "\
824 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
825 %{mnewlib:ecrti.o%s;:crti.o%s} \
826 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
827 #else
828 #define STARTFILE_LINUX_SPEC "\
829 %{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
830 %{mnewlib:ecrti.o%s;:crti.o%s} \
831 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
832 #endif
833
834 #define ENDFILE_LINUX_SPEC "\
835 %{shared|pie:crtendS.o%s;:crtend.o%s} \
836 %{mnewlib:ecrtn.o%s;:crtn.o%s}"
837
838 #define LINK_START_LINUX_SPEC ""
839
840 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
841 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
842 #if DEFAULT_LIBC == LIBC_UCLIBC
843 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
844 #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
845 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
846 #else
847 #error "Unsupported DEFAULT_LIBC"
848 #endif
849 #define LINUX_DYNAMIC_LINKER \
850 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
851
852 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
853 %{rdynamic:-export-dynamic} \
854 -dynamic-linker " LINUX_DYNAMIC_LINKER "}}"
855
856 #if defined(HAVE_LD_EH_FRAME_HDR)
857 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
858 #endif
859
860 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
861 %{!undef: \
862 %{!ansi: \
863 %{!std=*:-Dunix -D__unix -Dlinux -D__linux} \
864 %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}} \
865 -Asystem=linux -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
866
867 /* GNU/Hurd support. */
868 #define LIB_GNU_SPEC "%{mnewlib: --start-group -lgnu -lc --end-group } \
869 %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
870 %{profile:-lc_p} %{!profile:-lc}}}"
871
872 #define STARTFILE_GNU_SPEC "\
873 %{!shared: %{!static: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}} \
874 %{static: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
875 %{mnewlib: ecrti.o%s} %{!mnewlib: crti.o%s} \
876 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
877
878 #define ENDFILE_GNU_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
879 %{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}"
880
881 #define LINK_START_GNU_SPEC ""
882
883 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
884 %{rdynamic:-export-dynamic} \
885 -dynamic-linker /lib/ld.so.1}}"
886
887 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \
888 %{!undef: \
889 %{!ansi: -Dunix -D__unix}} \
890 -Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
891
892 /* NetBSD support. */
893 #define LIB_NETBSD_SPEC "\
894 %{profile:-lgmon -lc_p} %{!profile:-lc}"
895
896 #define STARTFILE_NETBSD_SPEC "\
897 ncrti.o%s crt0.o%s \
898 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
899
900 #define ENDFILE_NETBSD_SPEC "\
901 %{!shared:crtend.o%s} %{shared:crtendS.o%s} \
902 ncrtn.o%s"
903
904 #define LINK_START_NETBSD_SPEC "\
905 "
906
907 #define LINK_OS_NETBSD_SPEC "\
908 %{!shared: %{!static: \
909 %{rdynamic:-export-dynamic} \
910 -dynamic-linker /usr/libexec/ld.elf_so}}"
911
912 #define CPP_OS_NETBSD_SPEC "\
913 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
914
915 /* OpenBSD support. */
916 #ifndef LIB_OPENBSD_SPEC
917 #define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
918 #endif
919
920 #ifndef STARTFILE_OPENBSD_SPEC
921 #define STARTFILE_OPENBSD_SPEC "\
922 %{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
923 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
924 #endif
925
926 #ifndef ENDFILE_OPENBSD_SPEC
927 #define ENDFILE_OPENBSD_SPEC "\
928 %{!shared:crtend.o%s} %{shared:crtendS.o%s}"
929 #endif
930
931 #ifndef LINK_START_OPENBSD_SPEC
932 #define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
933 #endif
934
935 #ifndef LINK_OS_OPENBSD_SPEC
936 #define LINK_OS_OPENBSD_SPEC ""
937 #endif
938
939 #ifndef CPP_OS_OPENBSD_SPEC
940 #define CPP_OS_OPENBSD_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
941 #endif
942
943 /* Define any extra SPECS that the compiler needs to generate. */
944 /* Override rs6000.h definition. */
945 #undef SUBTARGET_EXTRA_SPECS
946 #define SUBTARGET_EXTRA_SPECS \
947 { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
948 { "lib_ads", LIB_ADS_SPEC }, \
949 { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
950 { "lib_mvme", LIB_MVME_SPEC }, \
951 { "lib_sim", LIB_SIM_SPEC }, \
952 { "lib_freebsd", LIB_FREEBSD_SPEC }, \
953 { "lib_gnu", LIB_GNU_SPEC }, \
954 { "lib_linux", LIB_LINUX_SPEC }, \
955 { "lib_netbsd", LIB_NETBSD_SPEC }, \
956 { "lib_openbsd", LIB_OPENBSD_SPEC }, \
957 { "lib_default", LIB_DEFAULT_SPEC }, \
958 { "startfile_ads", STARTFILE_ADS_SPEC }, \
959 { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
960 { "startfile_mvme", STARTFILE_MVME_SPEC }, \
961 { "startfile_sim", STARTFILE_SIM_SPEC }, \
962 { "startfile_freebsd", STARTFILE_FREEBSD_SPEC }, \
963 { "startfile_gnu", STARTFILE_GNU_SPEC }, \
964 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
965 { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
966 { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
967 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
968 { "endfile_ads", ENDFILE_ADS_SPEC }, \
969 { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
970 { "endfile_mvme", ENDFILE_MVME_SPEC }, \
971 { "endfile_sim", ENDFILE_SIM_SPEC }, \
972 { "endfile_freebsd", ENDFILE_FREEBSD_SPEC }, \
973 { "endfile_gnu", ENDFILE_GNU_SPEC }, \
974 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
975 { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \
976 { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \
977 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
978 { "link_path", LINK_PATH_SPEC }, \
979 { "link_shlib", LINK_SHLIB_SPEC }, \
980 { "link_target", LINK_TARGET_SPEC }, \
981 { "link_start", LINK_START_SPEC }, \
982 { "link_start_ads", LINK_START_ADS_SPEC }, \
983 { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
984 { "link_start_mvme", LINK_START_MVME_SPEC }, \
985 { "link_start_sim", LINK_START_SIM_SPEC }, \
986 { "link_start_freebsd", LINK_START_FREEBSD_SPEC }, \
987 { "link_start_gnu", LINK_START_GNU_SPEC }, \
988 { "link_start_linux", LINK_START_LINUX_SPEC }, \
989 { "link_start_netbsd", LINK_START_NETBSD_SPEC }, \
990 { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
991 { "link_start_default", LINK_START_DEFAULT_SPEC }, \
992 { "link_os", LINK_OS_SPEC }, \
993 { "link_os_ads", LINK_OS_ADS_SPEC }, \
994 { "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
995 { "link_os_mvme", LINK_OS_MVME_SPEC }, \
996 { "link_os_sim", LINK_OS_SIM_SPEC }, \
997 { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
998 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
999 { "link_os_gnu", LINK_OS_GNU_SPEC }, \
1000 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
1001 { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
1002 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
1003 { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \
1004 { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
1005 { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \
1006 { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
1007 { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
1008 { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
1009 { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
1010 { "cpp_os_sim", CPP_OS_SIM_SPEC }, \
1011 { "cpp_os_freebsd", CPP_OS_FREEBSD_SPEC }, \
1012 { "cpp_os_gnu", CPP_OS_GNU_SPEC }, \
1013 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
1014 { "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \
1015 { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
1016 { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \
1017 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
1018 SUBSUBTARGET_EXTRA_SPECS
1019
1020 #define SUBSUBTARGET_EXTRA_SPECS
1021
1022 /* Define this macro as a C expression for the initializer of an
1023 array of string to tell the driver program which options are
1024 defaults for this target and thus do not need to be handled
1025 specially when using `MULTILIB_OPTIONS'.
1026
1027 Do not define this macro if `MULTILIB_OPTIONS' is not defined in
1028 the target makefile fragment or if none of the options listed in
1029 `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
1030
1031 #define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
1032
1033 /* Define this macro if the code for function profiling should come
1034 before the function prologue. Normally, the profiling code comes
1035 after. */
1036 #define PROFILE_BEFORE_PROLOGUE 1
1037
1038 /* Function name to call to do profiling. */
1039 #define RS6000_MCOUNT "_mcount"
1040
1041 /* Select a format to encode pointers in exception handling data. CODE
1042 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
1043 true if the symbol may be affected by dynamic relocations. */
1044 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
1045 ((flag_pic || TARGET_RELOCATABLE) \
1046 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
1047 : DW_EH_PE_absptr)
1048
1049 #define DOUBLE_INT_ASM_OP "\t.quad\t"
1050
1051 /* Generate entries in .fixup for relocatable addresses. */
1052 #define RELOCATABLE_NEEDS_FIXUP 1
1053
1054 /* This target uses the sysv4.opt file. */
1055 #define TARGET_USES_SYSV4_OPT 1
1056
1057 #undef DBX_REGISTER_NUMBER