1/* Definitions of target machine for GNU compiler, for BeOS.
2   Copyright (C) 1997, 2000, 2001, 2002, 2003, 2005
3   Free Software Foundation, Inc.
4   Contributed by Fred Fish (fnf@cygnus.com), based on aix41.h
5   from David Edelsohn (edelsohn@npac.syr.edu).
6
7   This file is part of GCC.
8
9   GCC is free software; you can redistribute it and/or modify it
10   under the terms of the GNU General Public License as published
11   by the Free Software Foundation; either version 2, or (at your
12   option) any later version.
13
14   GCC is distributed in the hope that it will be useful, but WITHOUT
15   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17   License for more details.
18
19   You should have received a copy of the GNU General Public License
20   along with GCC; see the file COPYING.  If not, write to the
21   Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
22   MA 02110-1301, USA.  */
23
24#undef  TARGET_VERSION
25#define TARGET_VERSION fprintf (stderr, " (BeOS/PowerPC)");
26
27#undef ASM_SPEC
28#define ASM_SPEC "-u %(asm_cpu)"
29
30#undef TARGET_OS_CPP_BUILTINS
31/* __POWERPC__ must be defined for some header files.  */
32#define TARGET_OS_CPP_BUILTINS()          \
33  do                                      \
34    {                                     \
35      builtin_define ("__BEOS__");        \
36      builtin_define ("__POWERPC__");     \
37      builtin_assert ("system=beos");     \
38      builtin_assert ("cpu=powerpc");     \
39      builtin_assert ("machine=powerpc"); \
40    }                                     \
41  while (0)
42
43#undef CPP_SPEC
44#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}"
45
46/* This is the easiest way to disable use of gcc's builtin alloca,
47   which in the current BeOS release (DR9) is a problem because of the
48   relatively low default stack size of 256K with no way to expand it.
49   So anything we compile for the BeOS target should not use the
50   builtin alloca.  This also has the unwanted side effect of
51   disabling all builtin functions though.  */
52
53#undef CC1_SPEC
54#define CC1_SPEC "%{!fbuiltin: -fno-builtin}"
55#undef CC1PLUS_SPEC
56#define CC1PLUS_SPEC "%{!fbuiltin: -fno-builtin}"
57
58#undef	ASM_DEFAULT_SPEC
59#define ASM_DEFAULT_SPEC "-mppc"
60
61#undef TARGET_DEFAULT
62#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
63
64#undef PROCESSOR_DEFAULT
65#define PROCESSOR_DEFAULT PROCESSOR_PPC603
66
67/* Define this macro as a C expression for the initializer of an
68   array of string to tell the driver program which options are
69   defaults for this target and thus do not need to be handled
70   specially when using `MULTILIB_OPTIONS'.
71
72   Do not define this macro if `MULTILIB_OPTIONS' is not defined in
73   the target makefile fragment or if none of the options listed in
74   `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
75
76#undef	MULTILIB_DEFAULTS
77#define	MULTILIB_DEFAULTS { "mcpu=powerpc" }
78
79/* These empty definitions get rid of the attempt to link in crt0.o
80   and any libraries like libc.a.
81   On BeOS the ld executable is actually a linker front end that first runs
82   the GNU linker with the -r option to generate a relocatable XCOFF output
83   file, and then runs Metrowork's linker (mwld) to generate a fully linked
84   executable.  */
85
86#undef LIB_SPEC
87#define LIB_SPEC ""
88
89#undef LINK_SPEC
90#define LINK_SPEC ""
91
92#undef STARTFILE_SPEC
93#define STARTFILE_SPEC ""
94
95/* Text to write out after a CALL that may be replaced by glue code by
96   the loader.  */
97
98#undef RS6000_CALL_GLUE
99#define RS6000_CALL_GLUE "cror 15,15,15"
100
101/* Struct alignments are done on 4 byte boundaries for all types.  */
102#undef BIGGEST_FIELD_ALIGNMENT
103#define BIGGEST_FIELD_ALIGNMENT 32
104
105/* STANDARD_INCLUDE_DIR is the equivalent of "/usr/include" on UNIX.  */
106#define STANDARD_INCLUDE_DIR	"/boot/develop/headers/posix"
107
108/* SYSTEM_INCLUDE_DIR is the location for system specific, non-POSIX headers.  */
109#define SYSTEM_INCLUDE_DIR	"/boot/develop/headers/be"
110