OSDN Git Service

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