OSDN Git Service

* config/rs6000/aix.h: Convert CPP_PREDEFINES to
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / beos.h
1 /* Definitions of target machine for GNU compiler, for BeOS.
2    Copyright (C) 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
3    Contributed by Fred Fish (fnf@cygnus.com), based on aix41.h
4    from David Edelsohn (edelsohn@npac.syr.edu).
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 #undef  TARGET_VERSION
24 #define TARGET_VERSION fprintf (stderr, " (BeOS/PowerPC)");
25
26 /* Enable AIX XL compiler calling convention breakage compatibility.  */
27 #define MASK_XL_CALL            0x40000000
28 #define TARGET_XL_CALL          (target_flags & MASK_XL_CALL)
29 #undef  SUBTARGET_SWITCHES
30 #define SUBTARGET_SWITCHES              \
31   {"xl-call",           MASK_XL_CALL,                                   \
32    N_("Always pass floating-point arguments in memory") },              \
33   {"no-xl-call",        - MASK_XL_CALL,                                 \
34    N_("Don't always pass floating-point arguments in memory") },        \
35   {"threads",           0},                                             \
36   {"pe",                0},
37
38 #undef ASM_SPEC
39 #define ASM_SPEC "-u %(asm_cpu)"
40
41 #undef TARGET_OS_CPP_BUILTINS
42 /* __POWERPC__ must be defined for some header files */
43 #define TARGET_OS_CPP_BUILTINS()          \
44   do                                      \
45     {                                     \
46       builtin_define ("__BEOS__");        \
47       builtin_define ("__POWERPC__");     \
48       builtin_assert ("system=beos");     \
49       builtin_assert ("cpu=powerpc");     \
50       builtin_assert ("machine=powerpc"); \
51     }                                     \
52   while (0)
53
54 #undef CPP_SPEC
55 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}"
56
57 /* This is the easiest way to disable use of gcc's builtin alloca,
58    which in the current BeOS release (DR9) is a problem because of the
59    relatively low default stack size of 256K with no way to expand it.
60    So anything we compile for the BeOS target should not use the
61    builtin alloca.  This also has the unwanted side effect of
62    disabling all builtin functions though.  */
63
64 #undef CC1_SPEC
65 #define CC1_SPEC "%{!fbuiltin: -fno-builtin}"
66 #undef CC1PLUS_SPEC
67 #define CC1PLUS_SPEC "%{!fbuiltin: -fno-builtin}"
68
69 #undef  ASM_DEFAULT_SPEC
70 #define ASM_DEFAULT_SPEC "-mppc"
71
72 #undef TARGET_DEFAULT
73 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
74
75 #undef PROCESSOR_DEFAULT
76 #define PROCESSOR_DEFAULT PROCESSOR_PPC603
77
78 /* Define this macro as a C expression for the initializer of an
79    array of string to tell the driver program which options are
80    defaults for this target and thus do not need to be handled
81    specially when using `MULTILIB_OPTIONS'.
82
83    Do not define this macro if `MULTILIB_OPTIONS' is not defined in
84    the target makefile fragment or if none of the options listed in
85    `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
86
87 #undef  MULTILIB_DEFAULTS
88 #define MULTILIB_DEFAULTS { "mcpu=powerpc" }
89
90 /* These empty definitions get rid of the attempt to link in crt0.o
91    and any libraries like libc.a.
92    On BeOS the ld executable is actually a linker front end that first runs
93    the GNU linker with the -r option to generate a relocatable XCOFF output
94    file, and then runs Metrowork's linker (mwld) to generate a fully linked
95    executable.  */
96
97 #undef LIB_SPEC
98 #define LIB_SPEC ""
99
100 #undef LINK_SPEC
101 #define LINK_SPEC ""
102
103 #undef STARTFILE_SPEC
104 #define STARTFILE_SPEC ""
105
106 /* Text to write out after a CALL that may be replaced by glue code by
107    the loader.  */
108
109 #undef RS6000_CALL_GLUE
110 #define RS6000_CALL_GLUE "cror 15,15,15"
111
112 /* Struct alignments are done on 4 byte boundaries for all types.  */
113 #undef BIGGEST_FIELD_ALIGNMENT
114 #define BIGGEST_FIELD_ALIGNMENT 32
115
116 /* STANDARD_INCLUDE_DIR is the equivalent of "/usr/include" on UNIX.  */
117 #define STANDARD_INCLUDE_DIR    "/boot/develop/headers/posix"
118
119 /* SYSTEM_INCLUDE_DIR is the location for system specific, non-POSIX headers.  */
120 #define SYSTEM_INCLUDE_DIR      "/boot/develop/headers/be"