1 /* Definitions for Intel 386 running FreeBSD with ELF format
2 Copyright (C) 1996, 2000, 2002, 2004, 2007 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 Continued development by David O'Brien <obrien@freebsd.org>
7 Adapted from the FreeBSD version.
10 This file is part of GCC.
12 GCC is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 3, or (at your option)
17 GCC is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with GCC; see the file COPYING3. If not see
24 <http://www.gnu.org/licenses/>. */
27 #define TARGET_VERSION fprintf (stderr, " (i386 DragonFly/ELF)");
29 /* Override the default comment-starter of "/". */
30 #undef ASM_COMMENT_START
31 #define ASM_COMMENT_START "#"
34 #define ASM_APP_ON "#APP\n"
37 #define ASM_APP_OFF "#NO_APP\n"
39 #undef DBX_REGISTER_NUMBER
40 #define DBX_REGISTER_NUMBER(n) \
41 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
43 #undef NO_PROFILE_COUNTERS
44 #define NO_PROFILE_COUNTERS 1
46 /* Tell final.c that we don't need a label passed to mcount. */
49 #define MCOUNT_NAME ".mcount"
51 /* Make gcc agree with <machine/ansi.h>. */
54 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
57 #define PTRDIFF_TYPE "long int"
59 #undef WCHAR_TYPE_SIZE
60 #define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD)
62 #undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */
63 #define SUBTARGET_EXTRA_SPECS \
64 { "dfbsd_dynamic_linker", DFBSD_DYNAMIC_LINKER }
67 #define STARTFILE_SPEC DFBSD_STARTFILE_SPEC
70 #define ENDFILE_SPEC DFBSD_ENDFILE_SPEC
72 /* Provide a LINK_SPEC appropriate for DragonFly. Here we provide support
73 for the special GCC options -static and -shared, which allow us to
74 link things in one of these three modes by applying the appropriate
75 combinations of options at link-time. We like to support here for
76 as many of the other GNU linker options as possible. But I don't
77 have the time to search for those flags. I am sure how to add
78 support for -soname shared_object_name. H.J.
80 I took out %{v:%{!V:-V}}. It is too much :-(. They can use
83 When the -shared link option is used a final link is not being
88 %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
90 %{assert*} %{R*} %{rpath*} %{defsym*} \
91 %{shared:-Bshareable %{h*} %{soname*}} \
94 %{rdynamic:-export-dynamic} \
95 %{!dynamic-linker:-dynamic-linker %(dfbsd_dynamic_linker) }} \
97 %{symbolic:-Bsymbolic}" \
98 DFBSD_NATIVE_LINK_SPEC
100 /* A C statement to output to the stdio stream FILE an assembler
101 command to advance the location counter to a multiple of 1<<LOG
102 bytes if it is within MAX_SKIP bytes.
104 This is used to align code labels according to Intel recommendations. */
106 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
107 #undef ASM_OUTPUT_MAX_SKIP_ALIGN
108 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \
110 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
111 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
115 /* Don't default to pcc-struct-return, we want to retain compatibility with
116 older gcc versions AND pcc-struct-return is nonreentrant.
117 (even though the SVR4 ABI for the i386 says that records and unions are
118 returned in memory). */
120 #undef DEFAULT_PCC_STRUCT_RETURN
121 #define DEFAULT_PCC_STRUCT_RETURN 0
123 /* DragonFly sets the rounding precision of the FPU to 53 bits. Let the
124 compiler get the contents of <float.h> and std::numeric_limits correct. */
125 #undef TARGET_96_ROUND_53_LONG_DOUBLE
126 #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)