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