]> gcc.gnu.org Git - gcc.git/blame - gcc/config/i386/beos-elf.h
function.c (assign_temp): Accept either type or decl argument.
[gcc.git] / gcc / config / i386 / beos-elf.h
CommitLineData
512b62fb 1/* Definitions for Intel x86 running BeOS
32fb7c9d 2 Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
512b62fb
JM
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
512b62fb
JM
21
22#undef TARGET_VERSION
23#define TARGET_VERSION fprintf (stderr, " (i386 BeOS/ELF)");
24
25/* Change debugging to Dwarf2. */
26#undef PREFERRED_DEBUGGING_TYPE
27#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
28
29/* The SVR4 ABI for the i386 says that records and unions are returned
30 in memory. */
31#undef DEFAULT_PCC_STRUCT_RETURN
32#define DEFAULT_PCC_STRUCT_RETURN 1
33
34#undef ASM_COMMENT_START
35#define ASM_COMMENT_START " #"
36
512b62fb 37#undef DBX_REGISTER_NUMBER
0f7fa3d0
JH
38#define DBX_REGISTER_NUMBER(n) \
39 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
512b62fb
JM
40
41/* Output assembler code to FILE to increment profiler label # LABELNO
42 for profiling a function entry. */
43
44#undef FUNCTION_PROFILER
45#define FUNCTION_PROFILER(FILE, LABELNO) \
46{ \
47 if (flag_pic) \
48 { \
49 fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
50 LPREFIX, (LABELNO)); \
51 fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
52 } \
53 else \
54 { \
55 fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
56 fprintf (FILE, "\tcall mcount\n"); \
57 } \
58}
59
60#undef SIZE_TYPE
61#define SIZE_TYPE "long unsigned int"
62
63#undef PTRDIFF_TYPE
64#define PTRDIFF_TYPE "long int"
65
66#undef WCHAR_TYPE
67#define WCHAR_TYPE "short unsigned int"
68
69#undef WCHAR_UNSIGNED
70#define WCHAR_UNSIGNED 1
71
72#undef WCHAR_TYPE_SIZE
73#define WCHAR_TYPE_SIZE 16
74
75#undef CPP_PREDEFINES
76#define CPP_PREDEFINES "-D__ELF__ -D__BEOS__ -D__INTEL__ -D_X86_=1 \
77-D__stdcall=__attribute__((__stdcall__)) \
78-D__cdecl=__attribute__((__cdecl__)) \
79-D__declspec(x)=__attribute__((x)) \
2b57e919 80-Asystem=beos"
512b62fb
JM
81
82#undef CPP_SPEC
83#define CPP_SPEC "%(cpp_cpu) %{!no-fPIC:%{!no-fpic:-D__PIC__ -D__pic__}}"
84
85/* BeOS uses lots of multichars, so don't warn about them unless the
86 user explicitly asks for the warnings with -Wmultichar. Note that
892a2d68 87 CC1_SPEC is used for both cc1 and cc1plus. */
512b62fb
JM
88
89#undef CC1_SPEC
90#define CC1_SPEC "%{!no-fpic:%{!fPIC:-fpic}} %{!Wmultichar: -Wno-multichar} %(cc1_cpu) %{profile:-p}"
91
92#undef CC1PLUS_SPEC
93#define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}"
94
95/* Provide a LINK_SPEC appropriate for BeOS. Here we provide support
96 for the special GCC options -static and -shared, which allow us to
97 link things in one of these three modes by applying the appropriate
892a2d68 98 combinations of options at link-time. */
512b62fb 99
892a2d68 100/* If ELF is the default format, we should not use /lib/elf. */
512b62fb
JM
101
102#undef LINK_SPEC
103#define LINK_SPEC "%{!o*:-o %b} -m elf_i386_be -shared -Bsymbolic %{nostart:-e 0}"
104
105/* Provide start and end file specs appropriate to glibc. */
106
107/* LIB_SPEC for BeOS */
108#undef LIB_SPEC
109#define LIB_SPEC "-lnet -lroot"
110
111/* gcc runtime lib is built into libroot.so on BeOS */
112/* ??? This is gonna be lovely when the next release of gcc has
113 some new symbol in, so that links start failing. */
114#undef LIBGCC_SPEC
115#define LIBGCC_SPEC ""
116
117#undef STARTFILE_SPEC
a7a4fd17 118#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart:start_dyn.o%s} init_term_dyn.o%s %{p:i386-mcount.o%s}"
512b62fb
JM
119
120#undef ENDFILE_SPEC
121#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
122
512b62fb
JM
123/* A C statement (sans semicolon) to output to the stdio stream
124 FILE the assembler definition of uninitialized global DECL named
125 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
126 Try to use asm_output_aligned_bss to implement this macro. */
127
128#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
129 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
130
131/* A C statement to output to the stdio stream FILE an assembler
132 command to advance the location counter to a multiple of 1<<LOG
133 bytes if it is within MAX_SKIP bytes.
134
135 This is used to align code labels according to Intel recommendations. */
136
137#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
138#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
139 if ((LOG)!=0) \
140 if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
141 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
142#endif
143
512b62fb
JM
144/* For native compiler, use standard BeOS include file search paths
145 rooted in /boot/develop/headers. For a cross compiler, don't
146 expect the host to use the BeOS directory scheme, and instead look
147 for the BeOS include files relative to TOOL_INCLUDE_DIR. Yes, we
148 use ANSI string concatenation here (FIXME) */
149
150#ifndef CROSS_COMPILE
151#undef INCLUDE_DEFAULTS
152#define INCLUDE_DEFAULTS \
153 { \
154 { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },\
155 { GCC_INCLUDE_DIR, "GCC", 0, 0 },\
156 { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1}, \
157 { "/boot/develop/headers/be/add-ons/graphics", 0, 0, 0 },\
158 { "/boot/develop/headers/be/devel", 0, 0, 0 },\
159 { "/boot/develop/headers/be/translation", 0, 0, 0 },\
160 { "/boot/develop/headers/be/mail", 0, 0, 0 },\
161 { "/boot/develop/headers/gnu", 0, 0, 0 },\
162 { "/boot/develop/headers/be/drivers", 0, 0, 0 },\
163 { "/boot/develop/headers/be/opengl", 0, 0, 0 },\
164 { "/boot/develop/headers/be/game", 0, 0, 0 },\
165 { "/boot/develop/headers/be/support", 0, 0, 0 },\
166 { "/boot/develop/headers/be/storage", 0, 0, 0 },\
167 { "/boot/develop/headers/be/kernel", 0, 0, 0 },\
168 { "/boot/develop/headers/be/net", 0, 0, 0 },\
169 { "/boot/develop/headers/be/midi", 0, 0, 0 },\
a7a4fd17 170 { "/boot/develop/headers/be/midi2", 0, 0, 0 },\
512b62fb
JM
171 { "/boot/develop/headers/be/media", 0, 0, 0 },\
172 { "/boot/develop/headers/be/interface", 0, 0, 0 },\
173 { "/boot/develop/headers/be/device", 0, 0, 0 },\
174 { "/boot/develop/headers/be/app", 0, 0, 0 },\
512b62fb 175 { "/boot/develop/headers/be/precompiled", 0, 0, 0 },\
a7a4fd17
FF
176 { "/boot/develop/headers/be/add-ons/input_server", 0, 0, 0 },\
177 { "/boot/develop/headers/be/add-ons/net_server", 0, 0, 0 },\
178 { "/boot/develop/headers/be/add-ons/screen_saver", 0, 0, 0 },\
179 { "/boot/develop/headers/be/add-ons/tracker", 0, 0, 0 },\
180 { "/boot/develop/headers/be/be_apps/Deskbar", 0, 0, 0 },\
181 { "/boot/develop/headers/be/be_apps/NetPositive", 0, 0, 0 },\
182 { "/boot/develop/headers/be/be_apps/Tracker", 0, 0, 0 },\
183 { "/boot/develop/headers/be/drivers/tty", 0, 0, 0 },\
184 { "/boot/develop/headers/be/net/netinet", 0, 0, 0 },\
185 { "/boot/develop/headers/be/storage", 0, 0, 0 },\
512b62fb 186 { "/boot/develop/headers/be", 0, 0, 0 },\
a7a4fd17
FF
187 { "/boot/develop/headers/cpp", 0, 0, 0 },\
188 { "/boot/develop/headers/posix", 0, 0, 0 },\
512b62fb
JM
189 { "/boot/develop/headers", 0, 0, 0 }, \
190 { 0, 0, 0, 0 } \
a5a9cb26 191 }
512b62fb
JM
192#else /* CROSS_COMPILE */
193#undef INCLUDE_DEFAULTS
194#define INCLUDE_DEFAULTS \
195 { \
196 { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },\
197 { GCC_INCLUDE_DIR, "GCC", 0, 0 },\
198 { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1}, \
199 { CROSS_INCLUDE_DIR "/be/add-ons/graphics", 0, 0, 0 },\
200 { CROSS_INCLUDE_DIR "/be/devel", 0, 0, 0 },\
201 { CROSS_INCLUDE_DIR "/be/translation", 0, 0, 0 },\
202 { CROSS_INCLUDE_DIR "/be/mail", 0, 0, 0 },\
203 { CROSS_INCLUDE_DIR "/gnu", 0, 0, 0 },\
204 { CROSS_INCLUDE_DIR "/be/drivers", 0, 0, 0 },\
205 { CROSS_INCLUDE_DIR "/be/opengl", 0, 0, 0 },\
206 { CROSS_INCLUDE_DIR "/be/game", 0, 0, 0 },\
207 { CROSS_INCLUDE_DIR "/be/support", 0, 0, 0 },\
208 { CROSS_INCLUDE_DIR "/be/storage", 0, 0, 0 },\
209 { CROSS_INCLUDE_DIR "/be/kernel", 0, 0, 0 },\
210 { CROSS_INCLUDE_DIR "/be/net", 0, 0, 0 },\
211 { CROSS_INCLUDE_DIR "/be/midi", 0, 0, 0 },\
a7a4fd17 212 { CROSS_INCLUDE_DIR "/be/midi2", 0, 0, 0 },\
512b62fb
JM
213 { CROSS_INCLUDE_DIR "/be/media", 0, 0, 0 },\
214 { CROSS_INCLUDE_DIR "/be/interface", 0, 0, 0 },\
215 { CROSS_INCLUDE_DIR "/be/device", 0, 0, 0 },\
216 { CROSS_INCLUDE_DIR "/be/app", 0, 0, 0 },\
512b62fb 217 { CROSS_INCLUDE_DIR "/be/precompiled", 0, 0, 0 },\
a7a4fd17
FF
218 { CROSS_INCLUDE_DIR "/be/add-ons/input_server", 0, 0, 0 },\
219 { CROSS_INCLUDE_DIR "/be/add-ons/net_server", 0, 0, 0 },\
220 { CROSS_INCLUDE_DIR "/be/add-ons/screen_saver", 0, 0, 0 },\
221 { CROSS_INCLUDE_DIR "/be/add-ons/tracker", 0, 0, 0 },\
222 { CROSS_INCLUDE_DIR "/be/be_apps/Deskbar", 0, 0, 0 },\
223 { CROSS_INCLUDE_DIR "/be/be_apps/NetPositive", 0, 0, 0 },\
224 { CROSS_INCLUDE_DIR "/be/be_apps/Tracker", 0, 0, 0 },\
225 { CROSS_INCLUDE_DIR "/be/drivers/tty", 0, 0, 0 },\
226 { CROSS_INCLUDE_DIR "/be/net/netinet", 0, 0, 0 },\
227 { CROSS_INCLUDE_DIR "/be/storage", 0, 0, 0 },\
512b62fb 228 { CROSS_INCLUDE_DIR "/be", 0, 0, 0 },\
a7a4fd17
FF
229 { CROSS_INCLUDE_DIR "/cpp", 0, 0, 0 },\
230 { CROSS_INCLUDE_DIR "/posix", 0, 0, 0 },\
512b62fb
JM
231 { CROSS_INCLUDE_DIR , 0, 0, 0 }, \
232 { 0, 0, 0, 0 } \
a5a9cb26 233 }
512b62fb
JM
234#endif
235
236/* Whee. LIBRARY_PATH is Be's LD_LIBRARY_PATH, which of course will
237 cause nasty problems if we override it. */
238#define LIBRARY_PATH_ENV "BELIBRARIES"
239
240/* BeOS doesn't have a separate math library. */
241#define MATH_LIBRARY ""
242
243/* BeOS headers are C++-aware (and often use C++). */
244#define NO_IMPLICIT_EXTERN_C
245
246/* Define this macro if in some cases global symbols from one translation
247 unit may not be bound to undefined symbols in another translation unit
248 without user intervention. For instance, under Microsoft Windows
249 symbols must be explicitly imported from shared libraries (DLLs). */
250#define MULTIPLE_SYMBOL_SPACES
This page took 0.498259 seconds and 5 git commands to generate.