freebsd.h revision 40715
1/* Definitions for Intel 386 running FreeBSD with either a.out or ELF format 2 Copyright (C) 1994, 1995 Free Software Foundation, Inc. 3 Contributed by Eric Youngdale. 4 Modified for stabs-in-ELF by H.J. Lu. 5 Adapted from Linux version by John Polstra. 6 Added support for generating "old a.out gas" on the fly by Peter Wemm. 7 8This file is part of GNU CC. 9 10GNU CC is free software; you can redistribute it and/or modify 11it under the terms of the GNU General Public License as published by 12the Free Software Foundation; either version 2, or (at your option) 13any later version. 14 15GNU CC is distributed in the hope that it will be useful, 16but WITHOUT ANY WARRANTY; without even the implied warranty of 17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18GNU General Public License for more details. 19 20You should have received a copy of the GNU General Public License 21along with GNU CC; see the file COPYING. If not, write to 22the Free Software Foundation, 59 Temple Place - Suite 330, 23Boston, MA 02111-1307, USA. */ 24 25/* A lie, I guess, but the general idea behind FreeBSD/ELF is that we are 26 supposed to be outputting something that will assemble under SVr4. 27 This gets us pretty close. */ 28#include <i386/i386.h> /* Base i386 target machine definitions */ 29#include <i386/att.h> /* Use the i386 AT&T assembler syntax */ 30#include <linux.h> /* some common stuff */ 31 32/* Don't assume anything about the header files. */ 33#define NO_IMPLICIT_EXTERN_C 34 35/* This defines which switch letters take arguments. On svr4, most of 36 the normal cases (defined in gcc.c) apply, and we also have -h* and 37 -z* options (for the linker). We have a slightly different mix. We 38 have -R (alias --rpath), no -z, --soname (-h), --assert etc. */ 39 40#undef SWITCH_TAKES_ARG 41#define SWITCH_TAKES_ARG(CHAR) \ 42 ( (CHAR) == 'D' \ 43 || (CHAR) == 'U' \ 44 || (CHAR) == 'o' \ 45 || (CHAR) == 'e' \ 46 || (CHAR) == 'T' \ 47 || (CHAR) == 'u' \ 48 || (CHAR) == 'I' \ 49 || (CHAR) == 'm' \ 50 || (CHAR) == 'L' \ 51 || (CHAR) == 'A' \ 52 || (CHAR) == 'h' \ 53 || (CHAR) == 'z' /* ignored by ld */ \ 54 || (CHAR) == 'R') 55 56#undef WORD_SWITCH_TAKES_ARG 57#define WORD_SWITCH_TAKES_ARG(STR) \ 58 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ 59 || !strcmp (STR, "rpath") || !strcmp (STR, "rpath-link") \ 60 || !strcmp (STR, "soname") || !strcmp (STR, "defsym") \ 61 || !strcmp (STR, "assert") || !strcmp (STR, "dynamic-linker")) 62 63#undef TARGET_VERSION 64#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD)"); 65 66#define MASK_PROFILER_EPILOGUE 010000000000 67#define MASK_AOUT 004000000000 /* a.out not elf */ 68#define MASK_UNDERSCORES 002000000000 /* use leading _ */ 69 70#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE) 71#define TARGET_AOUT (target_flags & MASK_AOUT) 72#define TARGET_ELF ((target_flags & MASK_AOUT) == 0) 73#define TARGET_UNDERSCORES ((target_flags & MASK_UNDERSCORES) != 0) 74 75#undef SUBTARGET_SWITCHES 76#define SUBTARGET_SWITCHES \ 77 { "profiler-epilogue", MASK_PROFILER_EPILOGUE}, \ 78 { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE}, \ 79 { "aout", MASK_AOUT}, \ 80 { "no-aout", -MASK_AOUT}, \ 81 { "underscores", MASK_UNDERSCORES}, \ 82 { "no-underscores", -MASK_UNDERSCORES}, 83 84/* The svr4 ABI for the i386 says that records and unions are returned 85 in memory. */ 86/* On FreeBSD, we do not. */ 87#undef DEFAULT_PCC_STRUCT_RETURN 88#define DEFAULT_PCC_STRUCT_RETURN 0 89 90/* Prefix for internally generated assembler labels. If we aren't using 91 underscores, we are using prefix `.'s to identify labels that should 92 be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ 93#undef LPREFIX 94#define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L") 95 96/* Override the default comment-starter of "/". */ 97#undef ASM_COMMENT_START 98#define ASM_COMMENT_START "#" 99 100#undef COMMENT_BEGIN 101#define COMMENT_BEGIN "#" 102 103#undef ASM_APP_ON 104#define ASM_APP_ON "#APP\n" 105 106#undef ASM_APP_OFF 107#define ASM_APP_OFF "#NO_APP\n" 108 109/* Output at beginning of assembler file. */ 110/* The .file command should always begin the output. */ 111 112#undef ASM_FILE_START 113#define ASM_FILE_START(FILE) \ 114 do { \ 115 output_file_directive (FILE, main_input_filename); \ 116 if (TARGET_ELF) \ 117 fprintf (FILE, "\t.version\t\"01.01\"\n"); \ 118 } while (0) 119 120/* Identify the front-end which produced this file. To keep symbol 121 space down, and not confuse kdb, only do this if the language is 122 not C. (svr4.h defines ASM_IDENTIFY_GCC but neglects this) */ 123#undef ASM_IDENTIFY_LANGUAGE 124#define ASM_IDENTIFY_LANGUAGE(STREAM) \ 125{ \ 126 if (strcmp (lang_identify (), "c") != 0) \ 127 output_lang_identify (STREAM); \ 128} 129 130/* This is how to store into the string BUF 131 the symbol_ref name of an internal numbered label where 132 PREFIX is the class of label and NUM is the number within the class. 133 This is suitable for output with `assemble_name'. */ 134#undef ASM_GENERATE_INTERNAL_LABEL 135#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ 136 sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".", \ 137 (PREFIX), (NUMBER)) 138 139/* This is how to output an internal numbered label where 140 PREFIX is the class of label and NUM is the number within the class. */ 141#undef ASM_OUTPUT_INTERNAL_LABEL 142#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 143 fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \ 144 PREFIX, NUM) 145 146/* This is how to output a reference to a user-level label named NAME. */ 147#undef ASM_OUTPUT_LABELREF 148#define ASM_OUTPUT_LABELREF(FILE,NAME) \ 149 fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME) 150 151 152/* This is how to output an element of a case-vector that is relative. 153 This is only used for PIC code. See comments by the `casesi' insn in 154 i386.md for an explanation of the expression this outputs. */ 155#undef ASM_OUTPUT_ADDR_DIFF_ELT 156#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ 157 fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) 158 159#undef ASM_OUTPUT_ALIGN 160#define ASM_OUTPUT_ALIGN(FILE,LOG) \ 161 if ((LOG)!=0) fprintf ((FILE), "\t.p2align %d\n", (LOG)) 162 163/* Align labels, etc. at 4-byte boundaries. 164 For the 486, align to 16-byte boundary for sake of cache. */ 165#undef ASM_OUTPUT_ALIGN_CODE 166#define ASM_OUTPUT_ALIGN_CODE(FILE) \ 167 fprintf ((FILE), "\t.p2align %d,0x90\n", i386_align_jumps) 168 169/* Align start of loop at 4-byte boundary. */ 170#undef ASM_OUTPUT_LOOP_ALIGN 171#define ASM_OUTPUT_LOOP_ALIGN(FILE) \ 172 fprintf ((FILE), "\t.p2align %d,0x90\n", i386_align_loops) 173 174 175/* conditionalize the use of ".section rodata" on elf mode - otherwise .text */ 176#undef USE_CONST_SECTION 177#define USE_CONST_SECTION TARGET_ELF 178 179/* A C statement (sans semicolon) to output an element in the table of 180 global constructors. */ 181#undef ASM_OUTPUT_CONSTRUCTOR 182#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ 183 do { \ 184 if (TARGET_ELF) { \ 185 ctors_section (); \ 186 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 187 assemble_name (FILE, NAME); \ 188 fprintf (FILE, "\n"); \ 189 } else { \ 190 fprintf (asm_out_file, "%s \"%s__CTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 191 (TARGET_UNDERSCORES) ? "_" : ""); \ 192 assemble_name (asm_out_file, name); \ 193 fputc ('\n', asm_out_file); \ 194 } \ 195 } while (0) 196 197/* A C statement (sans semicolon) to output an element in the table of 198 global destructors. */ 199#undef ASM_OUTPUT_DESTRUCTOR 200#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ 201 do { \ 202 if (TARGET_ELF) { \ 203 dtors_section (); \ 204 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 205 assemble_name (FILE, NAME); \ 206 fprintf (FILE, "\n"); \ 207 } else { \ 208 fprintf (asm_out_file, "%s \"%s__DTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 209 (TARGET_UNDERSCORES) ? "_" : ""); \ 210 assemble_name (asm_out_file, name); \ 211 fputc ('\n', asm_out_file); \ 212 } \ 213 } while (0) 214 215/* This says how to output assembler code to declare an 216 uninitialized internal linkage data object. Under SVR4, 217 the linker seems to want the alignment of data objects 218 to depend on their types. We do exactly that here. */ 219 220#undef ASM_OUTPUT_ALIGNED_LOCAL 221#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 222do { \ 223 if (TARGET_ELF) { \ 224 fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \ 225 assemble_name ((FILE), (NAME)); \ 226 fprintf ((FILE), "\n"); \ 227 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ 228 } else { \ 229 int rounded = (SIZE); \ 230 if (rounded == 0) rounded = 1; \ 231 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 232 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 233 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 234 fputs (".lcomm ", (FILE)); \ 235 assemble_name ((FILE), (NAME)); \ 236 fprintf ((FILE), ",%u\n", (rounded)); \ 237 } \ 238} while (0) 239 240#undef ASM_OUTPUT_ALIGNED_COMMON 241#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 242do { \ 243 if (TARGET_ELF) { \ 244 fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \ 245 assemble_name ((FILE), (NAME)); \ 246 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ 247 } else { \ 248 int rounded = (SIZE); \ 249 if (rounded == 0) rounded = 1; \ 250 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 251 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 252 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 253 fputs (".comm ", (FILE)); \ 254 assemble_name ((FILE), (NAME)); \ 255 fprintf ((FILE), ",%u\n", (rounded)); \ 256 } \ 257} while (0) 258 259/* Turn off svr4.h version, it chokes the old gas. The old layout 260 works fine under new gas anyway. */ 261#undef ASM_OUTPUT_ASCII 262 263/* How to output some space */ 264#undef ASM_OUTPUT_SKIP 265#define ASM_OUTPUT_SKIP(FILE,SIZE) \ 266do { \ 267 if (TARGET_ELF) { \ 268 fprintf (FILE, "\t%s\t%u\n", SKIP_ASM_OP, (SIZE)); \ 269 } else { \ 270 fprintf (FILE, "\t.space %u\n", (SIZE)); \ 271 } \ 272} while (0) 273 274#undef ASM_OUTPUT_SOURCE_LINE 275#define ASM_OUTPUT_SOURCE_LINE(file, line) \ 276do { \ 277 static int sym_lineno = 1; \ 278 if (TARGET_ELF) { \ 279 fprintf (file, ".stabn 68,0,%d,.LM%d-", line, sym_lineno); \ 280 assemble_name (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\ 281 fprintf (file, "\n.LM%d:\n", sym_lineno); \ 282 sym_lineno += 1; \ 283 } else { \ 284 fprintf (file, "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno); \ 285 } \ 286} while (0) 287 288/* in elf, the function stabs come first, before the relative offsets */ 289#undef DBX_FUNCTION_FIRST 290#define DBX_CHECK_FUNCTION_FIRST TARGET_ELF 291 292/* tag end of file in elf mode */ 293#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END 294#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ 295do { \ 296 if (TARGET_ELF) { \ 297 fprintf (FILE, "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", N_SO); \ 298 } \ 299} while (0) 300 301/* stabs-in-elf has offsets relative to function beginning */ 302#undef DBX_OUTPUT_LBRAC 303#define DBX_OUTPUT_LBRAC(file,name) \ 304do { \ 305 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC); \ 306 assemble_name (asmfile, buf); \ 307 if (TARGET_ELF) { \ 308 fputc ('-', asmfile); \ 309 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ 310 } \ 311 fprintf (asmfile, "\n"); \ 312} while (0) 313 314#undef DBX_OUTPUT_RBRAC 315#define DBX_OUTPUT_RBRAC(file,name) \ 316do { \ 317 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC); \ 318 assemble_name (asmfile, buf); \ 319 if (TARGET_ELF) { \ 320 fputc ('-', asmfile); \ 321 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ 322 } \ 323 fprintf (asmfile, "\n"); \ 324} while (0) 325 326 327/* Define macro used to output shift-double opcodes when the shift 328 count is in %cl. Some assemblers require %cl as an argument; 329 some don't. 330 331 *OLD* GAS requires the %cl argument, so override i386/unix.h. */ 332 333#undef AS3_SHIFT_DOUBLE 334#define AS3_SHIFT_DOUBLE(a,b,c,d) AS3 (a,b,c,d) 335 336/* Indicate that jump tables go in the text section. This is 337 necessary when compiling PIC code. */ 338#define JUMP_TABLES_IN_TEXT_SECTION 339 340/* override the exception table positioning */ 341#define EXCEPTION_SECTION_FUNCTION \ 342do { \ 343 if (TARGET_ELF) { \ 344 named_section (NULL_TREE, ".gcc_except_table"); \ 345 } else { \ 346 if (flag_pic) \ 347 data_section (); \ 348 else \ 349 readonly_data_section (); \ 350 } \ 351} while (0); 352 353/* supply our own hook for calling __main() from main() */ 354#define GEN_CALL__MAIN \ 355 do { \ 356 if (!(TARGET_ELF)) \ 357 emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0, \ 358 VOIDmode, 0); \ 359 } while (0) 360 361/* Use dollar signs in special g++ assembler names. */ 362#undef NO_DOLLAR_IN_LABEL 363 364/* Map i386 registers to the numbers dwarf expects. Of course this is different 365 from what stabs expects. */ 366 367#undef DWARF_DBX_REGISTER_NUMBER 368#define DWARF_DBX_REGISTER_NUMBER(n) \ 369((n) == 0 ? 0 \ 370 : (n) == 1 ? 2 \ 371 : (n) == 2 ? 1 \ 372 : (n) == 3 ? 3 \ 373 : (n) == 4 ? 6 \ 374 : (n) == 5 ? 7 \ 375 : (n) == 6 ? 5 \ 376 : (n) == 7 ? 4 \ 377 : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \ 378 : (-1)) 379 380/* Now what stabs expects in the register. */ 381#define STABS_DBX_REGISTER_NUMBER(n) \ 382((n) == 0 ? 0 : \ 383 (n) == 1 ? 2 : \ 384 (n) == 2 ? 1 : \ 385 (n) == 3 ? 3 : \ 386 (n) == 4 ? 6 : \ 387 (n) == 5 ? 7 : \ 388 (n) == 6 ? 4 : \ 389 (n) == 7 ? 5 : \ 390 (n) + 4) 391 392#undef DBX_REGISTER_NUMBER 393#define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \ 394 ? DWARF_DBX_REGISTER_NUMBER(n) \ 395 : STABS_DBX_REGISTER_NUMBER(n)) 396 397/* Tell final.c that we don't need a label passed to mcount. */ 398#define NO_PROFILE_DATA 399 400/* Output assembler code to FILE to increment profiler label # LABELNO 401 for profiling a function entry. */ 402/* Redefine this to not pass an unused label in %edx. */ 403 404#undef FUNCTION_PROFILER 405#define FUNCTION_PROFILER(FILE, LABELNO) \ 406{ \ 407 if (flag_pic) \ 408 fprintf (FILE, "\tcall *%s@GOT(%%ebx)\n", \ 409 TARGET_AOUT ? "mcount" : ".mcount"); \ 410 else \ 411 fprintf (FILE, "\tcall %s\n", TARGET_AOUT ? "mcount" : ".mcount"); \ 412} 413 414#define FUNCTION_PROFILER_EPILOGUE(FILE) \ 415{ \ 416 if (TARGET_PROFILER_EPILOGUE) \ 417 { \ 418 if (flag_pic) \ 419 fprintf (FILE, "\tcall *%s@GOT(%%ebx)\n", \ 420 TARGET_AOUT ? "mexitcount" : ".mexitcount"); \ 421 else \ 422 fprintf (FILE, "\tcall %s\n", \ 423 TARGET_AOUT ? "mexitcount" : ".mexitcount"); \ 424 } \ 425} 426 427#undef SIZE_TYPE 428#define SIZE_TYPE "unsigned int" 429 430#undef PTRDIFF_TYPE 431#define PTRDIFF_TYPE "int" 432 433#undef WCHAR_TYPE 434#define WCHAR_TYPE "int" 435 436#define WCHAR_UNSIGNED 0 437 438#undef WCHAR_TYPE_SIZE 439#define WCHAR_TYPE_SIZE BITS_PER_WORD 440 441/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD 442 source tree so it can be configured appropriately without using 443 the GNU configure/build mechanism. */ 444 445#ifdef FREEBSD_NATIVE 446 447/* Look for the include files in the system-defined places. */ 448 449#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++" 450 451#define GCC_INCLUDE_DIR "/usr/include" 452 453/* FreeBSD has GCC_INCLUDE_DIR first. */ 454#define INCLUDE_DEFAULTS \ 455 { \ 456 { GCC_INCLUDE_DIR, 0, 0 }, \ 457 { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, \ 458 { 0, 0, 0 } \ 459 } 460 461/* Under FreeBSD, the normal location of the compiler back ends is the 462 /usr/libexec directory. */ 463 464#define STANDARD_EXEC_PREFIX "/usr/libexec/" 465 466/* Under FreeBSD, the normal location of the various *crt*.o files is the 467 /usr/lib directory. */ 468 469#define STANDARD_STARTFILE_PREFIX "/usr/lib/" 470 471/* On FreeBSD, gcc is called 'cc' */ 472#define GCC_NAME "cc" 473 474/* FreeBSD is 4.4BSD derived */ 475#define bsd4_4 476 477#endif /* FREEBSD_NATIVE */ 478 479#undef CPP_PREDEFINES 480#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=3 -D__FreeBSD_cc_version=272101 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)" 481 482#undef CPP_SPEC 483#if TARGET_CPU_DEFAULT == 2 484#define CPP_SPEC "\ 485%{!maout: -D__ELF__} \ 486%{munderscores: -D__UNDERSCORES__} \ 487%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ 488%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__}" 489#else 490#define CPP_SPEC "\ 491%{!maout: -D__ELF__} \ 492%{munderscores: -D__UNDERSCORES__} \ 493%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ 494%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__}" 495#endif 496 497#undef CC1_SPEC 498#define CC1_SPEC "\ 499%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ 500%{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}" 501 502#undef ASM_SPEC 503#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}" 504 505/* Like the default, except no -lg, and no -p. */ 506#undef LIB_SPEC 507#define LIB_SPEC "%{!shared:%{!pg:%{!pthread:%{!kthread:-lc}%{kthread:-lpthread -lc}}%{pthread:-lc_r}}%{pg:%{!pthread:%{!kthread:-lc_p}%{kthread:-lpthread_p -lc_p}}%{pthread:-lc_r_p}}}" 508 509/* Let gcc locate this for us according to the -m rules */ 510#undef LIBGCC_SPEC 511#define LIBGCC_SPEC "%{!shared:libgcc.a%s}" 512 513/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support 514 for the special GCC options -static and -shared, which allow us to 515 link things in one of these three modes by applying the appropriate 516 combinations of options at link-time. We like to support here for 517 as many of the other GNU linker options as possible. But I don't 518 have the time to search for those flags. I am sure how to add 519 support for -soname shared_object_name. H.J. 520 521 When the -shared link option is used a final link is not being 522 done. */ 523 524#undef LINK_SPEC 525#define LINK_SPEC "\ 526 %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ 527 %{maout: %{shared:-Bshareable} \ 528 %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ 529 %{pg:-Bstatic} %{Z}} \ 530 %{assert*} %{R*}} \ 531 %{!maout: \ 532 -m elf_i386 \ 533 %{Wl,*:%*} \ 534 %{assert*} %{R*} %{rpath*} %{defsym*} \ 535 %{shared:-Bshareable %{h*} %{soname*}} \ 536 %{symbolic:-Bsymbolic} \ 537 %{!shared: \ 538 %{!static: \ 539 %{rdynamic: -export-dynamic} \ 540 %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ 541 %{static:-Bstatic}}}" 542 543/* Get perform_* macros to build libgcc.a. */ 544#include "i386/perform.h" 545 546#undef STARTFILE_SPEC 547#define STARTFILE_SPEC "\ 548 %{maout: %{shared:c++rt0.o%s} \ 549 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \ 550 %{!maout: %{!shared: \ 551 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \ 552 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" 553 554#undef ENDFILE_SPEC 555#define ENDFILE_SPEC \ 556 "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}" 557 558/* This goes away when the math emulator is fixed. */ 559#undef TARGET_DEFAULT 560#define TARGET_DEFAULT (MASK_NO_FANCY_MATH_387 | 0301) 561 562#define HAVE_ATEXIT 563#define HAVE_PUTENV 564 565/* to assist building libgcc2.c */ 566#ifndef __ELF__ 567#undef OBJECT_FORMAT_ELF 568#endif 569