1 /* Configuration for an OpenBSD i386 target.
3 Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 /* This keeps us from using libraries compiled with the native cc, so
23 #undef NO_DOLLAR_IN_LABEL
25 /* Override the default comment-starter of "/". */
26 #undef ASM_COMMENT_START
27 #define ASM_COMMENT_START "#"
29 #undef DBX_REGISTER_NUMBER
30 #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
32 /* This goes away when the math-emulator is fixed */
34 #define TARGET_DEFAULT \
35 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
37 /* Run-time target specifications */
39 #define TARGET_OS_CPP_BUILTINS() \
42 OPENBSD_OS_CPP_BUILTINS(); \
46 /* As an elf system, we need crtbegin/crtend stuff. */
48 #define STARTFILE_SPEC "\
49 %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
50 crtbegin%O%s} %{shared:crtbeginS%O%s}"
52 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
54 /* Layout of source language data types. */
56 /* This must agree with <machine/ansi.h> */
58 #define SIZE_TYPE "long unsigned int"
61 #define PTRDIFF_TYPE "long int"
64 #define WCHAR_TYPE "int"
66 #undef WCHAR_TYPE_SIZE
67 #define WCHAR_TYPE_SIZE BITS_PER_WORD
70 #define WINT_TYPE "int"
72 /* Assembler format: overall framework. */
75 #define ASM_APP_ON "#APP\n"
78 #define ASM_APP_OFF "#NO_APP\n"
81 #define SET_ASM_OP "\t.set\t"
83 /* The following macros were originally stolen from i386v4.h.
84 These have to be defined to get PIC code correct. */
86 /* Assembler format: dispatch tables. */
88 /* Assembler format: sections. */
90 /* Stack & calling: aggregate returns. */
92 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
93 we want to retain compatibility with older gcc versions. */
94 #define DEFAULT_PCC_STRUCT_RETURN 0
96 /* Assembler format: alignment output. */
98 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
99 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
101 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
102 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
106 /* Stack & calling: profiling. */
108 /* OpenBSD's profiler recovers all information from the stack pointer.
109 The icky part is not here, but in machine/profile.h. */
110 #undef FUNCTION_PROFILER
111 #define FUNCTION_PROFILER(FILE, LABELNO) \
112 fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
114 /* Assembler format: exception region output. */
116 /* our configuration still doesn't handle dwarf2 correctly */
117 #define DWARF2_UNWIND_INFO 0
119 /* Assembler format: alignment output. */
121 /* Note that we pick up ASM_OUTPUT_MAX_SKIP_ALIGN from i386/gas.h */
123 /* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */
127 "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
128 %{shared:-shared} %{R*} \
130 %{!static:-Bdynamic} \
132 -dynamic-linker /usr/libexec/ld.so"
134 #define OBSD_HAS_CORRECT_SPECS