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