]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/gcc/config/i386/freebsd.h
This commit was generated by cvs2svn to compensate for changes in r55099,
[FreeBSD/FreeBSD.git] / contrib / gcc / config / i386 / freebsd.h
1 /* Definitions for Intel 386 running FreeBSD with either a.out or ELF format
2    Copyright (C) 1996 Free Software Foundation, Inc.
3    Contributed by Eric Youngdale.
4    Modified for stabs-in-ELF by H.J. Lu.
5    Adapted from GNU/Linux version by John Polstra.
6    Added support for generating "old a.out gas" on the fly by Peter Wemm.
7    Continued development by David O'Brien <obrien@freebsd.org>
8
9 This file is part of GNU CC.
10
11 GNU CC is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
14 any later version.
15
16 GNU CC is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with GNU CC; see the file COPYING.  If not, write to
23 the Free Software Foundation, 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA.  */
25
26 /* $FreeBSD$ */
27
28
29 #undef TARGET_VERSION
30 #define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)");
31
32 #define MASK_PROFILER_EPILOGUE  010000000000
33 #define MASK_AOUT               004000000000    /* a.out not elf */
34 #define MASK_UNDERSCORES        002000000000    /* use leading _ */
35
36 #define TARGET_PROFILER_EPILOGUE        (target_flags & MASK_PROFILER_EPILOGUE)
37 #define TARGET_AOUT                     (target_flags & MASK_AOUT)
38 #define TARGET_ELF                      ((target_flags & MASK_AOUT) == 0)
39 #define TARGET_UNDERSCORES              ((target_flags & MASK_UNDERSCORES) != 0)
40
41 #undef  SUBTARGET_SWITCHES
42 #define SUBTARGET_SWITCHES                                              \
43      { "profiler-epilogue",      MASK_PROFILER_EPILOGUE},               \
44      { "no-profiler-epilogue",  -MASK_PROFILER_EPILOGUE},               \
45      { "aout",                   MASK_AOUT},                            \
46      { "no-aout",               -MASK_AOUT},                            \
47      { "underscores",            MASK_UNDERSCORES},                     \
48      { "no-underscores",        -MASK_UNDERSCORES},
49
50 /* Prefix for internally generated assembler labels.  If we aren't using 
51    underscores, we are using prefix `.'s to identify labels that should  
52    be ignored, as in `i386/gas.h' --karl@cs.umb.edu  */                 
53 #undef  LPREFIX
54 #define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L")
55
56 /* Override the default comment-starter of "/".  */
57 #undef ASM_COMMENT_START
58 #define ASM_COMMENT_START "#"
59
60 #undef ASM_APP_ON
61 #define ASM_APP_ON "#APP\n"
62
63 #undef ASM_APP_OFF
64 #define ASM_APP_OFF "#NO_APP\n" 
65
66 #undef SET_ASM_OP
67 #define SET_ASM_OP      ".set"
68
69 /* Output at beginning of assembler file.  */
70 /* The .file command should always begin the output.  */
71
72 #undef ASM_FILE_START
73 #define ASM_FILE_START(FILE)                                            \
74   do {                                                                  \
75         output_file_directive ((FILE), main_input_filename);            \
76         if (TARGET_ELF)                                                 \
77           fprintf ((FILE), "\t.version\t\"01.01\"\n");                  \
78   } while (0)
79
80 /* Identify the front-end which produced this file.  To keep symbol
81    space down, and not confuse kdb, only do this if the language is
82    not C. (svr4.h defines ASM_IDENTIFY_GCC but neglects this) */
83 #undef ASM_IDENTIFY_LANGUAGE
84 #define ASM_IDENTIFY_LANGUAGE(STREAM)                                   \
85 {                                                                       \
86   if (strcmp (lang_identify (), "c") != 0)                              \
87     output_lang_identify (STREAM);                                      \
88 }
89
90 /* This is how to store into the string BUF
91    the symbol_ref name of an internal numbered label where      
92    PREFIX is the class of label and NUM is the number within the class.  
93    This is suitable for output with `assemble_name'.  */
94 #undef  ASM_GENERATE_INTERNAL_LABEL
95 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)                  \
96     sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".",         \
97              (PREFIX), (NUMBER))
98
99 /* This is how to output an internal numbered label where
100    PREFIX is the class of label and NUM is the number within the class.  */
101 #undef  ASM_OUTPUT_INTERNAL_LABEL
102 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)                      \
103   fprintf ((FILE), "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".",        \
104            (PREFIX), (NUM))
105
106 /* This is how to output a reference to a user-level label named NAME.  */
107 #undef  ASM_OUTPUT_LABELREF
108 #define ASM_OUTPUT_LABELREF(FILE, NAME)                                 \
109   fprintf ((FILE), "%s%s", (TARGET_UNDERSCORES) ? "_" : "", (NAME))
110
111 /* This is how to output an element of a case-vector that is relative.
112    This is only used for PIC code.  See comments by the `casesi' insn in
113    i386.md for an explanation of the expression this outputs. */
114 #undef ASM_OUTPUT_ADDR_DIFF_ELT
115 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
116   fprintf ((FILE), "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, (VALUE))
117
118 #undef ASM_OUTPUT_ALIGN
119 #define ASM_OUTPUT_ALIGN(FILE, LOG)                                     \
120   if ((LOG)!=0) {                                                       \
121     if (in_text_section())                                              \
122       fprintf ((FILE), "\t.p2align %d,0x90\n", (LOG));                  \
123     else                                                                \
124       fprintf ((FILE), "\t.p2align %d\n", (LOG));                       \
125   }
126
127 /* conditionalize the use of ".section rodata" on elf mode - otherwise .text */
128 #undef USE_CONST_SECTION
129 #define USE_CONST_SECTION       TARGET_ELF
130
131 /* The a.out tools do not support "linkonce" sections. */
132 #undef SUPPORTS_ONE_ONLY
133 #define SUPPORTS_ONE_ONLY       TARGET_ELF
134
135 /* The a.out tools do not support "Lscope" .stabs symbols. */
136 #undef NO_DBX_FUNCTION_END
137 #define NO_DBX_FUNCTION_END     TARGET_AOUT
138
139 /* A C statement (sans semicolon) to output an element in the table of
140    global constructors.  */
141 #undef ASM_OUTPUT_CONSTRUCTOR
142 #define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME)                              \
143   do {                                                                  \
144     if (TARGET_ELF) {                                                   \
145       ctors_section ();                                                 \
146       fprintf ((FILE), "\t%s\t ", INT_ASM_OP);                          \
147       assemble_name ((FILE), (NAME));                                   \
148       fprintf ((FILE), "\n");                                           \
149     } else {                                                            \
150       fprintf (asm_out_file, "%s \"%s__CTOR_LIST__\",22,0,0,", ASM_STABS_OP, \
151                (TARGET_UNDERSCORES) ? "_" : "");                        \
152       assemble_name (asm_out_file, name);                               \
153       fputc ('\n', asm_out_file);                                       \
154     }                                                                   \
155   } while (0)
156
157 /* A C statement (sans semicolon) to output an element in the table of
158    global destructors.  */
159 #undef ASM_OUTPUT_DESTRUCTOR
160 #define ASM_OUTPUT_DESTRUCTOR(FILE, NAME)                               \
161   do {                                                                  \
162     if (TARGET_ELF) {                                                   \
163       dtors_section ();                                                 \
164       fprintf ((FILE), "\t%s\t ", INT_ASM_OP);                          \
165       assemble_name ((FILE), (NAME));                                   \
166       fprintf ((FILE), "\n");                                           \
167     } else {                                                            \
168       fprintf (asm_out_file, "%s \"%s__DTOR_LIST__\",22,0,0,", ASM_STABS_OP, \
169                (TARGET_UNDERSCORES) ? "_" : "");                        \
170       assemble_name (asm_out_file, name);                               \
171       fputc ('\n', asm_out_file);                                       \
172     }                                                                   \
173   } while (0)
174
175 /* This says how to output assembler code to declare an
176    uninitialized internal linkage data object.  Under SVR4,
177    the linker seems to want the alignment of data objects
178    to depend on their types.  We do exactly that here.  */
179
180 #undef ASM_OUTPUT_ALIGNED_LOCAL
181 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
182 do {                                                                    \
183   if (TARGET_ELF) {                                                     \
184     fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP);                           \
185     assemble_name ((FILE), (NAME));                                     \
186     fprintf ((FILE), "\n");                                             \
187     ASM_OUTPUT_ALIGNED_COMMON ((FILE), (NAME), (SIZE), (ALIGN));        \
188   } else {                                                              \
189     int rounded = (SIZE);                                               \
190     if (rounded == 0) rounded = 1;                                      \
191     rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1;                 \
192     rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT)            \
193                            * (BIGGEST_ALIGNMENT / BITS_PER_UNIT));      \
194     fputs (".lcomm ", (FILE));                                          \
195     assemble_name ((FILE), (NAME));                                     \
196     fprintf ((FILE), ",%u\n", (rounded));                               \
197   }                                                                     \
198 } while (0)
199
200 #undef ASM_OUTPUT_ALIGNED_COMMON
201 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)              \
202 do {                                                                    \
203   if (TARGET_ELF) {                                                     \
204     fprintf ((FILE), "\t%s\t", COMMON_ASM_OP);                          \
205     assemble_name ((FILE), (NAME));                                     \
206     fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);      \
207   } else {                                                              \
208     int rounded = (SIZE);                                               \
209     if (rounded == 0) rounded = 1;                                      \
210     rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1;                 \
211     rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT)            \
212                            * (BIGGEST_ALIGNMENT / BITS_PER_UNIT));      \
213     fputs (".comm ", (FILE));                                           \
214     assemble_name ((FILE), (NAME));                                     \
215     fprintf ((FILE), ",%u\n", (rounded));                               \
216   }                                                                     \
217 } while (0)
218
219 /* Turn off svr4.h version, it chokes the old gas.  The old layout
220    works fine under new gas anyway. */
221 #undef ASM_OUTPUT_ASCII
222
223 /* How to output some space */
224 #undef ASM_OUTPUT_SKIP
225 #define ASM_OUTPUT_SKIP(FILE, SIZE)                                     \
226 do {                                                                    \
227   if (TARGET_ELF) {                                                     \
228     fprintf ((FILE), "\t%s\t%u\n", SKIP_ASM_OP, (SIZE));                \
229   } else {                                                              \
230     fprintf ((FILE), "\t.space %u\n", (SIZE));                          \
231   }                                                                     \
232 } while (0)
233
234 #undef ASM_OUTPUT_SOURCE_LINE
235 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE)                              \
236 do {                                                                    \
237   static int sym_lineno = 1;                                            \
238   if (TARGET_ELF) {                                                     \
239     fprintf ((FILE), ".stabn 68,0,%d,.LM%d-", (LINE), sym_lineno);      \
240     assemble_name ((FILE), XSTR (XEXP (DECL_RTL (current_function_decl),\
241                    0), 0));                                             \
242     fprintf ((FILE), "\n.LM%d:\n", sym_lineno);                         \
243     sym_lineno += 1;                                                    \
244   } else {                                                              \
245     fprintf ((FILE), "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);  \
246   }                                                                     \
247 } while (0)
248
249 /* in elf, the function stabs come first, before the relative offsets */
250 #undef DBX_FUNCTION_FIRST
251 #define DBX_CHECK_FUNCTION_FIRST TARGET_ELF
252
253 /* tag end of file in elf mode */
254 #undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
255 #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME)                 \
256 do {                                                                    \
257   if (TARGET_ELF) {                                                     \
258     fprintf ((FILE), "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", \
259              N_SO);                                                     \
260   }                                                                     \
261 } while (0)
262
263 /* stabs-in-elf has offsets relative to function beginning */
264 #undef DBX_OUTPUT_LBRAC
265 #define DBX_OUTPUT_LBRAC(FILE, NAME)                                    \
266 do {                                                                    \
267   fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC);               \
268   assemble_name (asmfile, buf);                                         \
269   if (TARGET_ELF) {                                                     \
270     fputc ('-', asmfile);                                               \
271     assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl),\
272                    0), 0));                                             \
273   }                                                                     \
274   fprintf (asmfile, "\n");                                              \
275 } while (0)
276
277 #undef DBX_OUTPUT_RBRAC
278 #define DBX_OUTPUT_RBRAC(FILE, NAME)                                    \
279 do {                                                                    \
280   fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC);               \
281   assemble_name (asmfile, buf);                                         \
282   if (TARGET_ELF) {                                                     \
283     fputc ('-', asmfile);                                               \
284     assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl),\
285                    0), 0));                                             \
286   }                                                                     \
287   fprintf (asmfile, "\n");                                              \
288 } while (0)
289
290
291 /* Define macro used to output shift-double opcodes when the shift
292    count is in %cl.  Some assemblers require %cl as an argument;
293    some don't.
294
295    *OLD* GAS requires the %cl argument, so override i386/unix.h. */
296       
297 #undef AS3_SHIFT_DOUBLE
298 #define AS3_SHIFT_DOUBLE(a,b,c,d) AS3 (a,b,c,d)
299
300 /* Indicate that jump tables go in the text section.  This is
301    necessary when compiling PIC code.  */
302 #undef JUMP_TABLES_IN_TEXT_SECTION
303 #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
304
305 /* override the exception table positioning */
306 #undef EXCEPTION_SECTION
307 #define EXCEPTION_SECTION() \
308 do {                                                                    \
309   if (TARGET_ELF) {                                                     \
310     named_section (NULL_TREE, ".gcc_except_table", 0);                  \
311   } else {                                                              \
312     if (flag_pic)                                                       \
313       data_section ();                                                  \
314     else                                                                \
315       readonly_data_section ();                                         \
316   }                                                                     \
317 } while (0);
318
319 /* supply our own hook for calling __main() from main() */
320 #undef INVOKE__main
321 #define INVOKE__main
322 #undef GEN_CALL__MAIN
323 #define GEN_CALL__MAIN \
324   do {                                                                  \
325     if (!(TARGET_ELF))                                                  \
326       emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0,    \
327                          VOIDmode, 0);                                  \
328   } while (0)
329
330 /* Copy this from the svr4 specifications... */
331 /* Define the register numbers to be used in Dwarf debugging information.
332    The SVR4 reference port C compiler uses the following register numbers
333    in its Dwarf output code:
334         0 for %eax (gnu regno = 0)
335         1 for %ecx (gnu regno = 2)
336         2 for %edx (gnu regno = 1)
337         3 for %ebx (gnu regno = 3)
338         4 for %esp (gnu regno = 7)
339         5 for %ebp (gnu regno = 6)
340         6 for %esi (gnu regno = 4)
341         7 for %edi (gnu regno = 5)
342    The following three DWARF register numbers are never generated by
343    the SVR4 C compiler or by the GNU compilers, but SDB on x86/svr4
344    believes these numbers have these meanings.
345         8  for %eip    (no gnu equivalent)
346         9  for %eflags (no gnu equivalent)
347         10 for %trapno (no gnu equivalent)
348    It is not at all clear how we should number the FP stack registers
349    for the x86 architecture.  If the version of SDB on x86/svr4 were
350    a bit less brain dead with respect to floating-point then we would
351    have a precedent to follow with respect to DWARF register numbers
352    for x86 FP registers, but the SDB on x86/svr4 is so completely
353    broken with respect to FP registers that it is hardly worth thinking
354    of it as something to strive for compatibility with.
355    The version of x86/svr4 SDB I have at the moment does (partially)
356    seem to believe that DWARF register number 11 is associated with
357    the x86 register %st(0), but that's about all.  Higher DWARF
358    register numbers don't seem to be associated with anything in
359    particular, and even for DWARF regno 11, SDB only seems to under-
360    stand that it should say that a variable lives in %st(0) (when
361    asked via an `=' command) if we said it was in DWARF regno 11,
362    but SDB still prints garbage when asked for the value of the
363    variable in question (via a `/' command).
364    (Also note that the labels SDB prints for various FP stack regs
365    when doing an `x' command are all wrong.)
366    Note that these problems generally don't affect the native SVR4
367    C compiler because it doesn't allow the use of -O with -g and
368    because when it is *not* optimizing, it allocates a memory
369    location for each floating-point variable, and the memory
370    location is what gets described in the DWARF AT_location
371    attribute for the variable in question.
372    Regardless of the severe mental illness of the x86/svr4 SDB, we
373    do something sensible here and we use the following DWARF
374    register numbers.  Note that these are all stack-top-relative
375    numbers.
376         11 for %st(0) (gnu regno = 8)
377         12 for %st(1) (gnu regno = 9)
378         13 for %st(2) (gnu regno = 10)
379         14 for %st(3) (gnu regno = 11)
380         15 for %st(4) (gnu regno = 12)
381         16 for %st(5) (gnu regno = 13)
382         17 for %st(6) (gnu regno = 14)
383         18 for %st(7) (gnu regno = 15)
384 */
385 #undef DWARF_DBX_REGISTER_NUMBER
386 #define DWARF_DBX_REGISTER_NUMBER(n) \
387 ((n) == 0 ? 0 \
388  : (n) == 1 ? 2 \
389  : (n) == 2 ? 1 \
390  : (n) == 3 ? 3 \
391  : (n) == 4 ? 6 \
392  : (n) == 5 ? 7 \
393  : (n) == 6 ? 5 \
394  : (n) == 7 ? 4 \
395  : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
396  : (-1))
397
398 /* Now what stabs expects in the register.  */
399 #undef STABS_DBX_REGISTER_NUMBER
400 #define STABS_DBX_REGISTER_NUMBER(n) \
401 ((n) == 0 ? 0 : \
402  (n) == 1 ? 2 : \
403  (n) == 2 ? 1 : \
404  (n) == 3 ? 3 : \
405  (n) == 4 ? 6 : \
406  (n) == 5 ? 7 : \
407  (n) == 6 ? 4 : \
408  (n) == 7 ? 5 : \
409  (n) + 4)
410
411 #undef  DBX_REGISTER_NUMBER
412 #define DBX_REGISTER_NUMBER(n)  ((write_symbols == DWARF_DEBUG) \
413                                 ? DWARF_DBX_REGISTER_NUMBER(n)  \
414                                 : STABS_DBX_REGISTER_NUMBER(n))
415
416 /* Tell final.c that we don't need a label passed to mcount.  */
417 #define NO_PROFILE_DATA
418
419 /* Output assembler code to FILE to increment profiler label # LABELNO
420    for profiling a function entry.  */
421 /* Redefine this to not pass an unused label in %edx.  */
422
423 #undef FUNCTION_PROFILER
424 #define FUNCTION_PROFILER(FILE, LABELNO)  \
425 {                                                                       \
426   if (flag_pic)                                                         \
427     {                                                                   \
428       fprintf ((FILE), "\tcall *%s@GOT(%%ebx)\n",                       \
429       TARGET_AOUT ? "mcount" : ".mcount");                              \
430     }                                                                   \
431   else                                                                  \
432     {                                                                   \
433       fprintf ((FILE), "\tcall %s\n", TARGET_AOUT ? "mcount" : ".mcount"); \
434     }                                                                   \
435 }
436
437 #undef FUNCTION_PROFILER_EPILOGUE
438 #define FUNCTION_PROFILER_EPILOGUE(FILE)  \
439 {                                                                       \
440   if (TARGET_PROFILER_EPILOGUE)                                         \
441     {                                                                   \
442       if (flag_pic)                                                     \
443         fprintf ((FILE), "\tcall *%s@GOT(%%ebx)\n",                     \
444           TARGET_AOUT ? "mexitcount" : ".mexitcount");                  \
445       else                                                              \
446         fprintf ((FILE), "\tcall %s\n",                                 \
447           TARGET_AOUT ? "mexitcount" : ".mexitcount");                  \
448     }                                                                   \
449 }
450
451 #undef SIZE_TYPE
452 #define SIZE_TYPE "unsigned int"
453  
454 #undef PTRDIFF_TYPE
455 #define PTRDIFF_TYPE "int"
456
457 #undef WCHAR_TYPE
458 #define WCHAR_TYPE "int"
459  
460 #undef WCHAR_UNSIGNED
461 #define WCHAR_UNSIGNED 0
462
463 #undef WCHAR_TYPE_SIZE
464 #define WCHAR_TYPE_SIZE BITS_PER_WORD
465
466 #undef CPP_PREDEFINES
467 #define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES
468
469 #undef CC1_SPEC
470 #define CC1_SPEC "\
471 %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
472 %{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}"
473
474 #undef  ASM_SPEC
475 #define ASM_SPEC        "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}"
476
477 /* Provide a LINK_SPEC appropriate for FreeBSD.  Here we provide support
478    for the special GCC options -static and -shared, which allow us to
479    link things in one of these three modes by applying the appropriate
480    combinations of options at link-time. We like to support here for
481    as many of the other GNU linker options as possible. But I don't
482    have the time to search for those flags. I am sure how to add
483    support for -soname shared_object_name. H.J.
484
485    I took out %{v:%{!V:-V}}. It is too much :-(. They can use
486    -Wl,-V.
487
488    When the -shared link option is used a final link is not being
489    done.  */
490
491 #undef  LINK_SPEC
492 #define LINK_SPEC "\
493  %{p:%e`-p' not supported; use `-pg' and gprof(1)} \
494   %{maout: %{shared:-Bshareable} \
495     %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
496       %{pg:-Bstatic} %{Z}} \
497     %{assert*} %{R*}} \
498   %{!maout: \
499     -m elf_i386 \
500     %{Wl,*:%*} \
501     %{assert*} %{R*} %{rpath*} %{defsym*} \
502     %{shared:-Bshareable %{h*} %{soname*}} \
503     %{symbolic:-Bsymbolic} \
504     %{!shared: \
505       %{!static: \
506         %{rdynamic: -export-dynamic} \
507         %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \
508       %{static:-Bstatic}}}"
509
510 /* A C statement to output to the stdio stream FILE an assembler
511    command to advance the location counter to a multiple of 1<<LOG
512    bytes if it is within MAX_SKIP bytes.
513
514    This is used to align code labels according to Intel recommendations.  */
515
516 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
517 #error "we don't have this for the aout gas"
518 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP)                  \
519   if ((LOG)!=0)                                                         \
520     if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG));      \
521     else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
522 #endif
523
524 #undef STARTFILE_SPEC
525 #define STARTFILE_SPEC "\
526   %{maout: %{shared:c++rt0.o%s} \
527     %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \
528   %{!maout:  %{!shared: \
529     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
530     crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
531
532 #undef  ENDFILE_SPEC
533 #define ENDFILE_SPEC \
534   "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
535
536 /* This goes away when the math emulator is fixed.  */
537 #undef TARGET_DEFAULT
538 #define TARGET_DEFAULT \
539   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
540
541 /* FreeBSD ELF using our home-grown crtbegin.o/crtend.o does not support the
542    DWARF2 unwinding mechanisms.  Once `make world' bootstraping problems with
543    the EGCS crtstuff.c is overcome, we will switch to the non-sjlj-exceptions 
544    type exception machanism.  */
545 #define DWARF2_UNWIND_INFO 0