Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004).
[official-gcc.git] / gcc / config / powerpcspe / sysv4.h
blob756e9e5649b423840f654a0d1d506f7a182a9716
1 /* Target definitions for GNU compiler for PowerPC running System V.4
2 Copyright (C) 1995-2018 Free Software Foundation, Inc.
3 Contributed by Cygnus Support.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* Yes! We are ELF. */
27 #define TARGET_OBJECT_FORMAT OBJECT_ELF
29 /* Default ABI to compile code for. */
30 #define DEFAULT_ABI rs6000_current_abi
32 /* Default ABI to use. */
33 #define RS6000_ABI_NAME "sysv"
35 /* Override rs6000.h definition. */
36 #undef ASM_DEFAULT_SPEC
37 #define ASM_DEFAULT_SPEC "-mppc"
39 #define TARGET_TOC (TARGET_64BIT \
40 || (TARGET_MINIMAL_TOC \
41 && flag_pic > 1) \
42 || DEFAULT_ABI != ABI_V4)
44 #define TARGET_BITFIELD_TYPE (! TARGET_NO_BITFIELD_TYPE)
45 #define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
46 #define TARGET_PROTOTYPE target_prototype
47 #define TARGET_NO_PROTOTYPE (! TARGET_PROTOTYPE)
48 #define TARGET_NO_TOC (! TARGET_TOC)
49 #define TARGET_NO_EABI (! TARGET_EABI)
50 #define TARGET_REGNAMES rs6000_regnames
52 #ifdef HAVE_AS_REL16
53 #undef TARGET_SECURE_PLT
54 #define TARGET_SECURE_PLT secure_plt
55 #endif
57 #define SDATA_DEFAULT_SIZE 8
59 /* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
60 get control in TARGET_OPTION_OVERRIDE. */
62 #define SUBTARGET_OVERRIDE_OPTIONS \
63 do { \
64 if (!global_options_set.x_g_switch_value) \
65 g_switch_value = SDATA_DEFAULT_SIZE; \
67 if (rs6000_abi_name == NULL) \
68 rs6000_abi_name = RS6000_ABI_NAME; \
70 if (!strcmp (rs6000_abi_name, "sysv")) \
71 rs6000_current_abi = ABI_V4; \
72 else if (!strcmp (rs6000_abi_name, "sysv-noeabi")) \
73 { \
74 rs6000_current_abi = ABI_V4; \
75 rs6000_isa_flags &= ~ OPTION_MASK_EABI; \
76 } \
77 else if (!strcmp (rs6000_abi_name, "sysv-eabi") \
78 || !strcmp (rs6000_abi_name, "eabi")) \
79 { \
80 rs6000_current_abi = ABI_V4; \
81 rs6000_isa_flags |= OPTION_MASK_EABI; \
82 } \
83 else if (!strcmp (rs6000_abi_name, "aixdesc")) \
84 rs6000_current_abi = ABI_AIX; \
85 else if (!strcmp (rs6000_abi_name, "freebsd") \
86 || !strcmp (rs6000_abi_name, "linux")) \
87 { \
88 if (TARGET_64BIT) \
89 rs6000_current_abi = ABI_AIX; \
90 else \
91 rs6000_current_abi = ABI_V4; \
92 } \
93 else if (!strcmp (rs6000_abi_name, "netbsd")) \
94 rs6000_current_abi = ABI_V4; \
95 else if (!strcmp (rs6000_abi_name, "openbsd")) \
96 rs6000_current_abi = ABI_V4; \
97 else if (!strcmp (rs6000_abi_name, "i960-old")) \
98 { \
99 rs6000_current_abi = ABI_V4; \
100 rs6000_isa_flags |= (OPTION_MASK_LITTLE_ENDIAN | OPTION_MASK_EABI); \
101 rs6000_isa_flags &= ~OPTION_MASK_STRICT_ALIGN; \
102 TARGET_NO_BITFIELD_WORD = 1; \
104 else \
106 rs6000_current_abi = ABI_V4; \
107 error ("bad value for -mcall-%s", rs6000_abi_name); \
110 if (rs6000_sdata_name) \
112 if (!strcmp (rs6000_sdata_name, "none")) \
113 rs6000_sdata = SDATA_NONE; \
114 else if (!strcmp (rs6000_sdata_name, "data")) \
115 rs6000_sdata = SDATA_DATA; \
116 else if (!strcmp (rs6000_sdata_name, "default")) \
117 rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV; \
118 else if (!strcmp (rs6000_sdata_name, "sysv")) \
119 rs6000_sdata = SDATA_SYSV; \
120 else if (!strcmp (rs6000_sdata_name, "eabi")) \
121 rs6000_sdata = SDATA_EABI; \
122 else \
123 error ("bad value for -msdata=%s", rs6000_sdata_name); \
125 else if (DEFAULT_ABI == ABI_V4) \
127 rs6000_sdata = SDATA_DATA; \
128 rs6000_sdata_name = "data"; \
130 else \
132 rs6000_sdata = SDATA_NONE; \
133 rs6000_sdata_name = "none"; \
136 if (TARGET_RELOCATABLE && \
137 (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
139 rs6000_sdata = SDATA_DATA; \
140 error ("-mrelocatable and -msdata=%s are incompatible", \
141 rs6000_sdata_name); \
144 else if (flag_pic && DEFAULT_ABI == ABI_V4 \
145 && (rs6000_sdata == SDATA_EABI \
146 || rs6000_sdata == SDATA_SYSV)) \
148 rs6000_sdata = SDATA_DATA; \
149 error ("-f%s and -msdata=%s are incompatible", \
150 (flag_pic > 1) ? "PIC" : "pic", \
151 rs6000_sdata_name); \
154 if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4) \
155 || (rs6000_sdata == SDATA_EABI && !TARGET_EABI)) \
157 rs6000_sdata = SDATA_NONE; \
158 error ("-msdata=%s and -mcall-%s are incompatible", \
159 rs6000_sdata_name, rs6000_abi_name); \
162 targetm.have_srodata_section = rs6000_sdata == SDATA_EABI; \
164 if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC) \
166 rs6000_isa_flags |= OPTION_MASK_MINIMAL_TOC; \
167 error ("-mrelocatable and -mno-minimal-toc are incompatible"); \
170 if (TARGET_RELOCATABLE && rs6000_current_abi != ABI_V4) \
172 rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \
173 error ("-mrelocatable and -mcall-%s are incompatible", \
174 rs6000_abi_name); \
177 if (!TARGET_64BIT && flag_pic > 1 && rs6000_current_abi != ABI_V4) \
179 flag_pic = 0; \
180 error ("-fPIC and -mcall-%s are incompatible", \
181 rs6000_abi_name); \
184 if (TARGET_SECURE_PLT != secure_plt) \
186 error ("-msecure-plt not supported by your assembler"); \
189 if (flag_pic > 1 && DEFAULT_ABI == ABI_V4) \
191 /* Note: flag_pic should not change any option flags that would \
192 be invalid with or pessimise -fno-PIC code. LTO turns off \
193 flag_pic when linking/recompiling a fixed position executable. \
194 However, if the objects were originally compiled with -fPIC, \
195 then other target options forced on here by -fPIC are restored \
196 when recompiling those objects without -fPIC. In particular \
197 TARGET_RELOCATABLE must not be enabled here by flag_pic. */ \
198 rs6000_isa_flags |= OPTION_MASK_MINIMAL_TOC; \
199 TARGET_NO_FP_IN_TOC = 1; \
202 if (TARGET_RELOCATABLE) \
204 if (!flag_pic) \
205 flag_pic = 2; \
206 TARGET_NO_FP_IN_TOC = 1; \
208 } while (0)
210 #ifndef RS6000_BI_ARCH
211 # define SUBSUBTARGET_OVERRIDE_OPTIONS \
212 do { \
213 if ((TARGET_DEFAULT ^ rs6000_isa_flags) & OPTION_MASK_64BIT) \
214 error ("-m%s not supported in this configuration", \
215 (rs6000_isa_flags & OPTION_MASK_64BIT) ? "64" : "32"); \
216 } while (0)
217 #endif
219 /* Override rs6000.h definition. */
220 #undef TARGET_DEFAULT
221 #define TARGET_DEFAULT 0
223 /* Override rs6000.h definition. */
224 #undef PROCESSOR_DEFAULT
225 #define PROCESSOR_DEFAULT PROCESSOR_PPC750
227 #define FIXED_R2 1
228 /* System V.4 uses register 13 as a pointer to the small data area,
229 so it is not available to the normal user. */
230 #define FIXED_R13 1
232 /* Override default big endianism definitions in rs6000.h. */
233 #undef BYTES_BIG_ENDIAN
234 #undef WORDS_BIG_ENDIAN
235 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
236 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
238 /* Put jump tables in read-only memory, rather than in .text. */
239 #define JUMP_TABLES_IN_TEXT_SECTION 0
241 /* Prefix and suffix to use to saving floating point. */
242 #define SAVE_FP_PREFIX "_savefpr_"
243 #define SAVE_FP_SUFFIX ""
245 /* Prefix and suffix to use to restoring floating point. */
246 #define RESTORE_FP_PREFIX "_restfpr_"
247 #define RESTORE_FP_SUFFIX ""
249 /* Type used for size_t, as a string used in a declaration. */
250 #undef SIZE_TYPE
251 #define SIZE_TYPE "unsigned int"
253 /* Type used for ptrdiff_t, as a string used in a declaration. */
254 #define PTRDIFF_TYPE "int"
256 #undef WCHAR_TYPE
257 #define WCHAR_TYPE "long int"
259 #undef WCHAR_TYPE_SIZE
260 #define WCHAR_TYPE_SIZE 32
262 /* Make int foo : 8 not cause structures to be aligned to an int boundary. */
263 /* Override elfos.h definition. */
264 #undef PCC_BITFIELD_TYPE_MATTERS
265 #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
267 #undef BITFIELD_NBYTES_LIMITED
268 #define BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)
270 /* Define this macro to be the value 1 if instructions will fail to
271 work if given data not on the nominal alignment. If instructions
272 will merely go slower in that case, define this macro as 0. */
273 #undef STRICT_ALIGNMENT
274 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
276 /* Define this macro if you wish to preserve a certain alignment for
277 the stack pointer, greater than what the hardware enforces. The
278 definition is a C expression for the desired alignment (measured
279 in bits). This macro must evaluate to a value equal to or larger
280 than STACK_BOUNDARY.
281 For the SYSV ABI and variants the alignment of the stack pointer
282 is usually controlled manually in rs6000.c. However, to maintain
283 alignment across alloca () in all circumstances,
284 PREFERRED_STACK_BOUNDARY needs to be set as well.
285 This has the additional advantage of allowing a bigger maximum
286 alignment of user objects on the stack. */
288 #undef PREFERRED_STACK_BOUNDARY
289 #define PREFERRED_STACK_BOUNDARY 128
291 /* Real stack boundary as mandated by the appropriate ABI. */
292 #define ABI_STACK_BOUNDARY \
293 ((TARGET_EABI && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI) ? 64 : 128)
295 /* An expression for the alignment of a structure field FIELD if the
296 alignment computed in the usual way is COMPUTED. */
297 #define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
298 (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \
299 ? 128 : COMPUTED)
301 #undef BIGGEST_FIELD_ALIGNMENT
303 /* Use ELF style section commands. */
305 #define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
307 #define DATA_SECTION_ASM_OP "\t.section\t\".data\""
309 #define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
311 /* Override elfos.h definition. */
312 #undef INIT_SECTION_ASM_OP
313 #define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
315 /* Override elfos.h definition. */
316 #undef FINI_SECTION_ASM_OP
317 #define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
319 #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
321 /* Put PC relative got entries in .got2. */
322 #define MINIMAL_TOC_SECTION_ASM_OP \
323 (flag_pic ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
325 #define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
326 #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
327 #define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"
329 /* Override default elf definitions. */
330 #define TARGET_ASM_INIT_SECTIONS rs6000_elf_asm_init_sections
331 #undef TARGET_ASM_RELOC_RW_MASK
332 #define TARGET_ASM_RELOC_RW_MASK rs6000_elf_reloc_rw_mask
333 #undef TARGET_ASM_SELECT_RTX_SECTION
334 #define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section
336 /* Return nonzero if this entry is to be written into the constant pool
337 in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
338 containing one of them. If -mfp-in-toc (the default), we also do
339 this for floating-point constants. We actually can only do this
340 if the FP formats of the target and host machines are the same, but
341 we can't check that since not every file that uses these target macros
342 includes real.h.
344 Unlike AIX, we don't key off of -mminimal-toc, but instead do not
345 allow floating point constants in the TOC if -mrelocatable. */
347 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
348 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
349 (TARGET_TOC \
350 && (GET_CODE (X) == SYMBOL_REF \
351 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
352 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
353 || GET_CODE (X) == LABEL_REF \
354 || (GET_CODE (X) == CONST_INT \
355 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
356 || (!TARGET_NO_FP_IN_TOC \
357 && GET_CODE (X) == CONST_DOUBLE \
358 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
359 && BITS_PER_WORD == HOST_BITS_PER_INT)))
361 /* These macros generate the special .type and .size directives which
362 are used to set the corresponding fields of the linker symbol table
363 entries in an ELF object file under SVR4. These macros also output
364 the starting labels for the relevant functions/objects. */
366 /* Write the extra assembler code needed to declare a function properly.
367 Some svr4 assemblers need to also have something extra said about the
368 function's return value. We allow for that here. */
370 /* Override elfos.h definition. */
371 #undef ASM_DECLARE_FUNCTION_NAME
372 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
373 rs6000_elf_declare_function_name ((FILE), (NAME), (DECL))
375 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore
376 flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */
378 #define LOCAL_LABEL_PREFIX "."
379 #define USER_LABEL_PREFIX ""
381 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
382 asm_fprintf (FILE, "%L%s", PREFIX)
384 /* Globalizing directive for a label. */
385 #define GLOBAL_ASM_OP "\t.globl "
387 /* This says how to output assembler code to declare an
388 uninitialized internal linkage data object. Under SVR4,
389 the linker seems to want the alignment of data objects
390 to depend on their types. We do exactly that here. */
392 #define LOCAL_ASM_OP "\t.local\t"
394 #define LCOMM_ASM_OP "\t.lcomm\t"
396 /* Describe how to emit uninitialized local items. */
397 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
398 do { \
399 if ((DECL) && rs6000_elf_in_small_data_p (DECL)) \
401 switch_to_section (sbss_section); \
402 ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
403 ASM_OUTPUT_LABEL (FILE, NAME); \
404 ASM_OUTPUT_SKIP (FILE, SIZE); \
405 if (!flag_inhibit_size_directive && (SIZE) > 0) \
406 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
408 else \
410 fprintf (FILE, "%s", LCOMM_ASM_OP); \
411 assemble_name ((FILE), (NAME)); \
412 fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
413 (SIZE), (ALIGN) / BITS_PER_UNIT); \
415 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
416 } while (0)
418 /* Describe how to emit uninitialized external linkage items. */
419 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
420 do { \
421 ASM_OUTPUT_ALIGNED_DECL_LOCAL (FILE, DECL, NAME, SIZE, ALIGN); \
422 } while (0)
424 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
425 /* To support -falign-* switches we need to use .p2align so
426 that alignment directives in code sections will be padded
427 with no-op instructions, rather than zeroes. */
428 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
429 if ((LOG) != 0) \
431 if ((MAX_SKIP) == 0) \
432 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
433 else \
434 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
436 #endif
438 /* This is how to output code to push a register on the stack.
439 It need not be very fast code.
441 On the rs6000, we must keep the backchain up to date. In order
442 to simplify things, always allocate 16 bytes for a push (System V
443 wants to keep stack aligned to a 16 byte boundary). */
445 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \
446 do { \
447 if (DEFAULT_ABI == ABI_V4) \
448 asm_fprintf (FILE, \
449 "\tstwu %s,-16(%s)\n\tstw %s,12(%s)\n", \
450 reg_names[1], reg_names[1], reg_names[REGNO], \
451 reg_names[1]); \
452 } while (0)
454 /* This is how to output an insn to pop a register from the stack.
455 It need not be very fast code. */
457 #define ASM_OUTPUT_REG_POP(FILE, REGNO) \
458 do { \
459 if (DEFAULT_ABI == ABI_V4) \
460 asm_fprintf (FILE, \
461 "\tlwz %s,12(%s)\n\taddi %s,%s,16\n", \
462 reg_names[REGNO], reg_names[1], reg_names[1], \
463 reg_names[1]); \
464 } while (0)
466 extern int fixuplabelno;
468 /* Handle constructors specially for -mrelocatable. */
469 #define TARGET_ASM_CONSTRUCTOR rs6000_elf_asm_out_constructor
470 #define TARGET_ASM_DESTRUCTOR rs6000_elf_asm_out_destructor
472 /* This is the end of what might become sysv4.h. */
474 /* Use DWARF 2 debugging information by default. */
475 #undef PREFERRED_DEBUGGING_TYPE
476 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
478 /* Historically we have also supported stabs debugging. */
479 #define DBX_DEBUGGING_INFO 1
481 #define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info
482 #define TARGET_IN_SMALL_DATA_P rs6000_elf_in_small_data_p
484 /* The ELF version doesn't encode [DS] or whatever at the end of symbols. */
486 #define RS6000_OUTPUT_BASENAME(FILE, NAME) \
487 assemble_name (FILE, NAME)
489 /* We have to output the stabs for the function name *first*, before
490 outputting its label. */
492 #define DBX_FUNCTION_FIRST
494 /* This is the end of what might become sysv4dbx.h. */
496 #define TARGET_OS_SYSV_CPP_BUILTINS() \
497 do \
499 if (rs6000_isa_flags_explicit \
500 & OPTION_MASK_RELOCATABLE) \
501 builtin_define ("_RELOCATABLE"); \
503 while (0)
505 #ifndef TARGET_OS_CPP_BUILTINS
506 #define TARGET_OS_CPP_BUILTINS() \
507 do \
509 builtin_define_std ("PPC"); \
510 builtin_define_std ("unix"); \
511 builtin_define ("__svr4__"); \
512 builtin_assert ("system=unix"); \
513 builtin_assert ("system=svr4"); \
514 builtin_assert ("cpu=powerpc"); \
515 builtin_assert ("machine=powerpc"); \
516 TARGET_OS_SYSV_CPP_BUILTINS (); \
518 while (0)
519 #endif
521 /* Select one of BIG_OPT, LITTLE_OPT or DEFAULT_OPT depending
522 on various -mbig, -mlittle and -mcall- options. */
523 #define ENDIAN_SELECT(BIG_OPT, LITTLE_OPT, DEFAULT_OPT) \
524 "%{mlittle|mlittle-endian:" LITTLE_OPT ";" \
525 "mbig|mbig-endian:" BIG_OPT ";" \
526 "mcall-i960-old:" LITTLE_OPT ";" \
527 ":" DEFAULT_OPT "}"
529 #define DEFAULT_ASM_ENDIAN " -mbig"
531 #undef ASM_SPEC
532 #define ASM_SPEC "%(asm_cpu) \
533 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
534 %{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \
535 %{memb|msdata=eabi: -memb}" \
536 ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
538 #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
539 #define CC1_SECURE_PLT_DEFAULT_SPEC ""
540 #endif
541 #ifndef LINK_SECURE_PLT_DEFAULT_SPEC
542 #define LINK_SECURE_PLT_DEFAULT_SPEC ""
543 #endif
545 /* Pass -G xxx to the compiler. */
546 #undef CC1_SPEC
547 #define CC1_SPEC "%{G*} %(cc1_cpu)" \
548 "%{meabi: %{!mcall-*: -mcall-sysv }} \
549 %{!meabi: %{!mno-eabi: \
550 %{mrelocatable: -meabi } \
551 %{mcall-freebsd: -mno-eabi } \
552 %{mcall-i960-old: -meabi } \
553 %{mcall-linux: -mno-eabi } \
554 %{mcall-netbsd: -mno-eabi } \
555 %{mcall-openbsd: -mno-eabi }}} \
556 %{msdata: -msdata=default} \
557 %{mno-sdata: -msdata=none} \
558 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
559 %{profile: -p}"
561 /* Default starting address if specified. */
562 #define LINK_START_SPEC "\
563 %{mads : %(link_start_ads) ; \
564 myellowknife : %(link_start_yellowknife) ; \
565 mmvme : %(link_start_mvme) ; \
566 msim : %(link_start_sim) ; \
567 mcall-freebsd: %(link_start_freebsd) ; \
568 mcall-linux : %(link_start_linux) ; \
569 mcall-netbsd : %(link_start_netbsd) ; \
570 mcall-openbsd: %(link_start_openbsd) ; \
571 : %(link_start_default) }"
573 #define LINK_START_DEFAULT_SPEC ""
574 #define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC
576 #undef LINK_SPEC
577 #define LINK_SPEC "\
578 %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
579 %{R*} \
580 %(link_shlib) \
581 %{!T*: %(link_start) } \
582 %{!static: %{!mbss-plt: %(link_secure_plt)}} \
583 %(link_os)"
585 /* Shared libraries are not default. */
586 #define LINK_SHLIB_SPEC "\
587 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
588 %{static: } \
589 %{shared:-G -dy -z text } \
590 %{symbolic:-Bsymbolic -G -dy -z text }"
592 /* Any specific OS flags. */
593 #define LINK_OS_SPEC "\
594 %{mads : %(link_os_ads) ; \
595 myellowknife : %(link_os_yellowknife) ; \
596 mmvme : %(link_os_mvme) ; \
597 msim : %(link_os_sim) ; \
598 mcall-freebsd: %(link_os_freebsd) ; \
599 mcall-linux : %(link_os_linux) ; \
600 mcall-netbsd : %(link_os_netbsd) ; \
601 mcall-openbsd: %(link_os_openbsd) ; \
602 : %(link_os_default) }"
604 #define LINK_OS_DEFAULT_SPEC ""
606 #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
607 %<msingle-float %<mdouble-float}"
609 /* Override rs6000.h definition. */
610 #undef CPP_SPEC
611 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
612 %{mads : %(cpp_os_ads) ; \
613 myellowknife : %(cpp_os_yellowknife) ; \
614 mmvme : %(cpp_os_mvme) ; \
615 msim : %(cpp_os_sim) ; \
616 mcall-freebsd: %(cpp_os_freebsd) ; \
617 mcall-linux : %(cpp_os_linux) ; \
618 mcall-netbsd : %(cpp_os_netbsd) ; \
619 mcall-openbsd: %(cpp_os_openbsd) ; \
620 : %(cpp_os_default) }"
622 #define CPP_OS_DEFAULT_SPEC ""
624 #undef STARTFILE_SPEC
625 #define STARTFILE_SPEC "\
626 %{mads : %(startfile_ads) ; \
627 myellowknife : %(startfile_yellowknife) ; \
628 mmvme : %(startfile_mvme) ; \
629 msim : %(startfile_sim) ; \
630 mcall-freebsd: %(startfile_freebsd) ; \
631 mcall-linux : %(startfile_linux) ; \
632 mcall-netbsd : %(startfile_netbsd) ; \
633 mcall-openbsd: %(startfile_openbsd) ; \
634 : %(startfile_default) }"
636 #define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s"
638 #undef LIB_SPEC
639 #define LIB_SPEC "\
640 %{mads : %(lib_ads) ; \
641 myellowknife : %(lib_yellowknife) ; \
642 mmvme : %(lib_mvme) ; \
643 msim : %(lib_sim) ; \
644 mcall-freebsd: %(lib_freebsd) ; \
645 mcall-linux : %(lib_linux) ; \
646 mcall-netbsd : %(lib_netbsd) ; \
647 mcall-openbsd: %(lib_openbsd) ; \
648 : %(lib_default) }"
650 #define LIB_DEFAULT_SPEC "-lc"
652 #undef ENDFILE_SPEC
653 #define ENDFILE_SPEC "\
654 %{mads : %(endfile_ads) ; \
655 myellowknife : %(endfile_yellowknife) ; \
656 mmvme : %(endfile_mvme) ; \
657 msim : %(endfile_sim) ; \
658 mcall-freebsd: %(endfile_freebsd) ; \
659 mcall-linux : %(endfile_linux) ; \
660 mcall-netbsd : %(endfile_netbsd) ; \
661 mcall-openbsd: %(endfile_openbsd) ; \
662 : %(crtsavres_default) %(endfile_default) }"
664 #define CRTSAVRES_DEFAULT_SPEC ""
666 #define ENDFILE_DEFAULT_SPEC "crtend.o%s ecrtn.o%s"
668 /* Motorola ADS support. */
669 #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
671 #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
673 #define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
675 #define LINK_START_ADS_SPEC "-T ads.ld%s"
677 #define LINK_OS_ADS_SPEC ""
679 #define CPP_OS_ADS_SPEC ""
681 /* Motorola Yellowknife support. */
682 #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
684 #define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
686 #define ENDFILE_YELLOWKNIFE_SPEC "crtend.o%s ecrtn.o%s"
688 #define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
690 #define LINK_OS_YELLOWKNIFE_SPEC ""
692 #define CPP_OS_YELLOWKNIFE_SPEC ""
694 /* Motorola MVME support. */
695 #define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
697 #define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
699 #define ENDFILE_MVME_SPEC "crtend.o%s ecrtn.o%s"
701 #define LINK_START_MVME_SPEC "-Ttext 0x40000"
703 #define LINK_OS_MVME_SPEC ""
705 #define CPP_OS_MVME_SPEC ""
707 /* PowerPC simulator based on netbsd system calls support. */
708 #define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
710 #define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s crtbegin.o%s"
712 #define ENDFILE_SIM_SPEC "crtend.o%s ecrtn.o%s"
714 #define LINK_START_SIM_SPEC ""
716 #define LINK_OS_SIM_SPEC "-m elf32ppcsim"
718 #define CPP_OS_SIM_SPEC ""
720 /* FreeBSD support. */
722 #define CPP_OS_FREEBSD_SPEC "\
723 -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
724 -Acpu=powerpc -Amachine=powerpc"
726 #define STARTFILE_FREEBSD_SPEC FBSD_STARTFILE_SPEC
727 #define ENDFILE_FREEBSD_SPEC FBSD_ENDFILE_SPEC
728 #define LIB_FREEBSD_SPEC FBSD_LIB_SPEC
729 #define LINK_START_FREEBSD_SPEC ""
731 #define LINK_OS_FREEBSD_SPEC "\
732 %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
733 %{v:-V} \
734 %{assert*} %{R*} %{rpath*} %{defsym*} \
735 %{shared:-Bshareable %{h*} %{soname*}} \
736 %{!shared: \
737 %{!static: \
738 %{rdynamic: -export-dynamic} \
739 -dynamic-linker %(fbsd_dynamic_linker) } \
740 %{static:-Bstatic}} \
741 %{symbolic:-Bsymbolic}"
743 /* GNU/Linux support. */
744 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
745 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
746 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
748 #if ENABLE_OFFLOADING == 1
749 #define CRTOFFLOADBEGIN "%{fopenacc|fopenmp:crtoffloadbegin%O%s}"
750 #define CRTOFFLOADEND "%{fopenacc|fopenmp:crtoffloadend%O%s}"
751 #else
752 #define CRTOFFLOADBEGIN ""
753 #define CRTOFFLOADEND ""
754 #endif
756 #ifdef HAVE_LD_PIE
757 #define STARTFILE_LINUX_SPEC "\
758 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
759 %{mnewlib:ecrti.o%s;:crti.o%s} \
760 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
761 " CRTOFFLOADBEGIN
762 #else
763 #define STARTFILE_LINUX_SPEC "\
764 %{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
765 %{mnewlib:ecrti.o%s;:crti.o%s} \
766 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
767 " CRTOFFLOADBEGIN
768 #endif
770 #define ENDFILE_LINUX_SPEC "\
771 %{shared|pie:crtendS.o%s;:crtend.o%s} \
772 %{mnewlib:ecrtn.o%s;:crtn.o%s} \
773 " CRTOFFLOADEND
775 #define LINK_START_LINUX_SPEC ""
777 #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
779 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
780 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
781 #define MUSL_DYNAMIC_LINKER \
782 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
783 #if DEFAULT_LIBC == LIBC_UCLIBC
784 #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
785 "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
786 #elif DEFAULT_LIBC == LIBC_MUSL
787 #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
788 "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
789 #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
790 #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
791 "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
792 #else
793 #error "Unsupported DEFAULT_LIBC"
794 #endif
795 #define GNU_USER_DYNAMIC_LINKER \
796 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
797 MUSL_DYNAMIC_LINKER)
799 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
800 %{rdynamic:-export-dynamic} \
801 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
803 #if defined(HAVE_LD_EH_FRAME_HDR)
804 # define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
805 #endif
807 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
808 %{!undef: \
809 %{!ansi: \
810 %{!std=*:-Dunix -D__unix -Dlinux -D__linux} \
811 %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}} \
812 -Asystem=linux -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
814 /* NetBSD support. */
815 #define LIB_NETBSD_SPEC "\
816 -lc"
818 #define STARTFILE_NETBSD_SPEC "\
819 ncrti.o%s crt0.o%s \
820 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
822 #define ENDFILE_NETBSD_SPEC "\
823 %{!shared:crtend.o%s} %{shared:crtendS.o%s} \
824 ncrtn.o%s"
826 #define LINK_START_NETBSD_SPEC "\
829 #define LINK_OS_NETBSD_SPEC "\
830 %{!shared: %{!static: \
831 %{rdynamic:-export-dynamic} \
832 -dynamic-linker /usr/libexec/ld.elf_so}}"
834 #define CPP_OS_NETBSD_SPEC "\
835 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
837 /* OpenBSD support. */
838 #ifndef LIB_OPENBSD_SPEC
839 #define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
840 #endif
842 #ifndef STARTFILE_OPENBSD_SPEC
843 #define STARTFILE_OPENBSD_SPEC "\
844 %{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
845 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
846 #endif
848 #ifndef ENDFILE_OPENBSD_SPEC
849 #define ENDFILE_OPENBSD_SPEC "\
850 %{!shared:crtend.o%s} %{shared:crtendS.o%s}"
851 #endif
853 #ifndef LINK_START_OPENBSD_SPEC
854 #define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
855 #endif
857 #ifndef LINK_OS_OPENBSD_SPEC
858 #define LINK_OS_OPENBSD_SPEC ""
859 #endif
861 #ifndef CPP_OS_OPENBSD_SPEC
862 #define CPP_OS_OPENBSD_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
863 #endif
865 /* Define any extra SPECS that the compiler needs to generate. */
866 /* Override rs6000.h definition. */
867 #undef SUBTARGET_EXTRA_SPECS
868 #define SUBTARGET_EXTRA_SPECS \
869 { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
870 { "lib_ads", LIB_ADS_SPEC }, \
871 { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
872 { "lib_mvme", LIB_MVME_SPEC }, \
873 { "lib_sim", LIB_SIM_SPEC }, \
874 { "lib_freebsd", LIB_FREEBSD_SPEC }, \
875 { "lib_linux", LIB_LINUX_SPEC }, \
876 { "lib_netbsd", LIB_NETBSD_SPEC }, \
877 { "lib_openbsd", LIB_OPENBSD_SPEC }, \
878 { "lib_default", LIB_DEFAULT_SPEC }, \
879 { "startfile_ads", STARTFILE_ADS_SPEC }, \
880 { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
881 { "startfile_mvme", STARTFILE_MVME_SPEC }, \
882 { "startfile_sim", STARTFILE_SIM_SPEC }, \
883 { "startfile_freebsd", STARTFILE_FREEBSD_SPEC }, \
884 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
885 { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
886 { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
887 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
888 { "endfile_ads", ENDFILE_ADS_SPEC }, \
889 { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
890 { "endfile_mvme", ENDFILE_MVME_SPEC }, \
891 { "endfile_sim", ENDFILE_SIM_SPEC }, \
892 { "endfile_freebsd", ENDFILE_FREEBSD_SPEC }, \
893 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
894 { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \
895 { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \
896 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
897 { "link_shlib", LINK_SHLIB_SPEC }, \
898 { "link_start", LINK_START_SPEC }, \
899 { "link_start_ads", LINK_START_ADS_SPEC }, \
900 { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
901 { "link_start_mvme", LINK_START_MVME_SPEC }, \
902 { "link_start_sim", LINK_START_SIM_SPEC }, \
903 { "link_start_freebsd", LINK_START_FREEBSD_SPEC }, \
904 { "link_start_linux", LINK_START_LINUX_SPEC }, \
905 { "link_start_netbsd", LINK_START_NETBSD_SPEC }, \
906 { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
907 { "link_start_default", LINK_START_DEFAULT_SPEC }, \
908 { "link_os", LINK_OS_SPEC }, \
909 { "link_os_ads", LINK_OS_ADS_SPEC }, \
910 { "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
911 { "link_os_mvme", LINK_OS_MVME_SPEC }, \
912 { "link_os_sim", LINK_OS_SIM_SPEC }, \
913 { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
914 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
915 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
916 { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
917 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
918 { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
919 { "link_secure_plt", LINK_SECURE_PLT_SPEC }, \
920 { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
921 { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
922 { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
923 { "cpp_os_sim", CPP_OS_SIM_SPEC }, \
924 { "cpp_os_freebsd", CPP_OS_FREEBSD_SPEC }, \
925 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
926 { "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \
927 { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
928 { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \
929 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
930 SUBSUBTARGET_EXTRA_SPECS
932 #define SUBSUBTARGET_EXTRA_SPECS
934 /* Define this macro as a C expression for the initializer of an
935 array of string to tell the driver program which options are
936 defaults for this target and thus do not need to be handled
937 specially when using `MULTILIB_OPTIONS'.
939 Do not define this macro if `MULTILIB_OPTIONS' is not defined in
940 the target makefile fragment or if none of the options listed in
941 `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
943 #define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
945 /* Define this macro if the code for function profiling should come
946 before the function prologue. Normally, the profiling code comes
947 after. */
948 #define PROFILE_BEFORE_PROLOGUE 1
950 /* Function name to call to do profiling. */
951 #define RS6000_MCOUNT "_mcount"
953 /* Select a format to encode pointers in exception handling data. CODE
954 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
955 true if the symbol may be affected by dynamic relocations. */
956 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
957 (flag_pic \
958 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \
959 | DW_EH_PE_sdata4) \
960 : DW_EH_PE_absptr)
962 #define DOUBLE_INT_ASM_OP "\t.quad\t"
964 /* Generate entries in .fixup for relocatable addresses. */
965 #define RELOCATABLE_NEEDS_FIXUP 1
967 #define TARGET_ASM_FILE_END rs6000_elf_file_end
969 #undef TARGET_ASAN_SHADOW_OFFSET
970 #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
972 /* This target uses the sysv4.opt file. */
973 #define TARGET_USES_SYSV4_OPT 1
975 /* Include order changes for musl, same as in generic linux.h. */
976 #if DEFAULT_LIBC == LIBC_MUSL
977 #define INCLUDE_DEFAULTS_MUSL_GPP \
978 { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
979 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
980 { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
981 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
982 { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
983 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
985 #ifdef LOCAL_INCLUDE_DIR
986 #define INCLUDE_DEFAULTS_MUSL_LOCAL \
987 { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
988 { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
989 #else
990 #define INCLUDE_DEFAULTS_MUSL_LOCAL
991 #endif
993 #ifdef PREFIX_INCLUDE_DIR
994 #define INCLUDE_DEFAULTS_MUSL_PREFIX \
995 { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
996 #else
997 #define INCLUDE_DEFAULTS_MUSL_PREFIX
998 #endif
1000 #ifdef CROSS_INCLUDE_DIR
1001 #define INCLUDE_DEFAULTS_MUSL_CROSS \
1002 { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
1003 #else
1004 #define INCLUDE_DEFAULTS_MUSL_CROSS
1005 #endif
1007 #ifdef TOOL_INCLUDE_DIR
1008 #define INCLUDE_DEFAULTS_MUSL_TOOL \
1009 { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
1010 #else
1011 #define INCLUDE_DEFAULTS_MUSL_TOOL
1012 #endif
1014 #ifdef NATIVE_SYSTEM_HEADER_DIR
1015 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
1016 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
1017 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
1018 #else
1019 #define INCLUDE_DEFAULTS_MUSL_NATIVE
1020 #endif
1022 #if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
1023 # undef INCLUDE_DEFAULTS_MUSL_LOCAL
1024 # define INCLUDE_DEFAULTS_MUSL_LOCAL
1025 # undef INCLUDE_DEFAULTS_MUSL_NATIVE
1026 # define INCLUDE_DEFAULTS_MUSL_NATIVE
1027 #else
1028 # undef INCLUDE_DEFAULTS_MUSL_CROSS
1029 # define INCLUDE_DEFAULTS_MUSL_CROSS
1030 #endif
1032 #undef INCLUDE_DEFAULTS
1033 #define INCLUDE_DEFAULTS \
1035 INCLUDE_DEFAULTS_MUSL_GPP \
1036 INCLUDE_DEFAULTS_MUSL_LOCAL \
1037 INCLUDE_DEFAULTS_MUSL_PREFIX \
1038 INCLUDE_DEFAULTS_MUSL_CROSS \
1039 INCLUDE_DEFAULTS_MUSL_TOOL \
1040 INCLUDE_DEFAULTS_MUSL_NATIVE \
1041 { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
1042 { 0, 0, 0, 0, 0, 0 } \
1044 #endif