OSDN Git Service

Fix copyrights.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / beos-pe.h
1 /* Operating system specific defines for BeOS target.
2    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
3    Free Software Foundation, Inc.
4    Contributed by Fred Fish (fnf@cygnus.com), based on cygwin32.h.
5
6 This file is part of GNU CC.
7
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING.  If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
22
23
24 /* Get all the PE support related things.  */
25 #include "cygwin32.h"
26
27 /* Change debugging to Dwarf2.  */
28 #undef SDB_DEBUGGING_INFO
29 #undef DBX_DEBUGGING_INFO
30 #define DWARF2_DEBUGGING_INFO
31 #undef PREFERRED_DEBUGGING_TYPE
32 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
33
34 /* Support the __declspec keyword by turning them into attributes.
35    We currently only support: dllimport and dllexport.
36    Note that the current way we do this may result in a collision with
37    predefined attributes later on.  This can be solved by using one attribute,
38    say __declspec__, and passing args to it.  The problem with that approach
39    is that args are not accumulated: each new appearance would clobber any
40    existing args.  */
41
42 #undef CPP_PREDEFINES
43 #define CPP_PREDEFINES "-D__BEOS__ -D__INTEL__ -D_X86_=1 \
44 -D__stdcall=__attribute__((__stdcall__)) \
45 -D__cdecl=__attribute__((__cdecl__)) \
46 -D__declspec(x)=__attribute__((x)) \
47 -Asystem(beos)"
48
49 #undef CPP_SPEC
50 #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
51
52 #undef LIB_SPEC
53 #define LIB_SPEC "-lroot -lbe -ltracker -lmedia -lnet -lnetdev -ldevice -lmidi -lgame -latalk -lmail"
54
55 #undef STARTFILE_SPEC
56 #define STARTFILE_SPEC "/boot/develop/lib/x86/start_dyn.o /boot/develop/lib/x86/init_term_dyn.o /boot/develop/lib/x86/glue-noinit.a"
57
58 /* Temporary. */
59 #define LINKERSCRIPT_SPEC "%{!T:-Tbeos.ld}"
60
61 /* No math library. */
62 #define MATH_LIBRARY ""
63
64 /* Don't ignore dllimport for functions.  */
65 #undef TARGET_NOP_FUN_DLLIMPORT
66 #define TARGET_NOP_FUN_DLLIMPORT 0
67
68 #undef SUBTARGET_SWITCHES
69 #define SUBTARGET_SWITCHES
70
71 /* Disable DWARF2 unwind info; this doesn't appear to work on
72    COFF-based targets right now. (I want to say "duh?" but someone
73    will correct me later. */
74
75 #undef INCOMING_RETURN_ADDR_RTX
76 #undef DWARF2_UNWIND_INFO
77 \f
78 /* In the current BeOS release (DR9), use of gcc's builtin alloca is a
79    problem because of the relatively low default stack size of 256K with no
80    way to expand it.  So anything we compile for the BeOS target should not
81    use the builtin alloca.  Defining SMALL_STACK disables builtin alloca.  */
82
83 #define SMALL_STACK
84
85 /* Yuck. */
86 #ifndef CROSS_COMPILE
87 #undef INCLUDE_DEFAULTS
88 #define INCLUDE_DEFAULTS \
89     { \
90     { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },\
91     { GCC_INCLUDE_DIR, "GCC", 0, 0 },\
92     { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1}, \
93     { "/boot/develop/headers/be/add-ons/graphics", 0, 0, 0 },\
94     { "/boot/develop/headers/be/translation", 0, 0, 0 },\
95     { "/boot/develop/headers/be/mail", 0, 0, 0 },\
96     { "/boot/develop/headers/gnu", 0, 0, 0 },\
97     { "/boot/develop/headers/be/drivers", 0, 0, 0 },\
98     { "/boot/develop/headers/be/game", 0, 0, 0 },\
99     { "/boot/develop/headers/be/support", 0, 0, 0 },\
100     { "/boot/develop/headers/be/storage", 0, 0, 0 },\
101     { "/boot/develop/headers/be/kernel", 0, 0, 0 },\
102     { "/boot/develop/headers/be/net", 0, 0, 0 },\
103     { "/boot/develop/headers/be/midi", 0, 0, 0 },\
104     { "/boot/develop/headers/be/media", 0, 0, 0 },\
105     { "/boot/develop/headers/be/interface", 0, 0, 0 },\
106     { "/boot/develop/headers/be/device", 0, 0, 0 },\
107     { "/boot/develop/headers/be/app", 0, 0, 0 },\
108     { "/boot/develop/headers/cpp", 0, 0, 0 },\
109     { "/boot/develop/headers/posix", 0, 0, 0 },\
110     { "/boot/develop/headers/be/precompiled", 0, 0, 0 },\
111     { "/boot/develop/headers/be", 0, 0, 0 },\
112     { "/boot/develop/headers", 0, 0, 0 }, \
113     { 0, 0, 0, 0 } \
114     };
115 #endif
116
117 /* Whee.  LIBRARY_PATH is Be's LD_LIBRARY_PATH, which of course will
118    cause nasty problems if we override it.  */
119 #define LIBRARY_PATH_ENV        "BELIBRARIES"