PR target/16201
[official-gcc.git] / gcc / config / rs6000 / beos.h
blob1ce36bf70aab9bd12420cc6552da64a960f0f68c
1 /* Definitions of target machine for GNU compiler, for BeOS.
2 Copyright (C) 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
3 Contributed by Fred Fish (fnf@cygnus.com), based on aix41.h
4 from David Edelsohn (edelsohn@npac.syr.edu).
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 2, or (at your
11 option) any later version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to the
20 Free Software Foundation, 59 Temple Place - Suite 330, Boston,
21 MA 02111-1307, USA. */
23 #undef TARGET_VERSION
24 #define TARGET_VERSION fprintf (stderr, " (BeOS/PowerPC)");
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},
38 #undef ASM_SPEC
39 #define ASM_SPEC "-u %(asm_cpu)"
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)
54 #undef CPP_SPEC
55 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}"
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. */
64 #undef CC1_SPEC
65 #define CC1_SPEC "%{!fbuiltin: -fno-builtin}"
66 #undef CC1PLUS_SPEC
67 #define CC1PLUS_SPEC "%{!fbuiltin: -fno-builtin}"
69 #undef ASM_DEFAULT_SPEC
70 #define ASM_DEFAULT_SPEC "-mppc"
72 #undef TARGET_DEFAULT
73 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
75 #undef PROCESSOR_DEFAULT
76 #define PROCESSOR_DEFAULT PROCESSOR_PPC603
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'.
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::. */
87 #undef MULTILIB_DEFAULTS
88 #define MULTILIB_DEFAULTS { "mcpu=powerpc" }
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. */
97 #undef LIB_SPEC
98 #define LIB_SPEC ""
100 #undef LINK_SPEC
101 #define LINK_SPEC ""
103 #undef STARTFILE_SPEC
104 #define STARTFILE_SPEC ""
106 /* Text to write out after a CALL that may be replaced by glue code by
107 the loader. */
109 #undef RS6000_CALL_GLUE
110 #define RS6000_CALL_GLUE "cror 15,15,15"
112 /* Struct alignments are done on 4 byte boundaries for all types. */
113 #undef BIGGEST_FIELD_ALIGNMENT
114 #define BIGGEST_FIELD_ALIGNMENT 32
116 /* STANDARD_INCLUDE_DIR is the equivalent of "/usr/include" on UNIX. */
117 #define STANDARD_INCLUDE_DIR "/boot/develop/headers/posix"
119 /* SYSTEM_INCLUDE_DIR is the location for system specific, non-POSIX headers. */
120 #define SYSTEM_INCLUDE_DIR "/boot/develop/headers/be"