Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / config / rs6000 / rtems.h
blobe82dcb9d20e03c1620411f918f474e93c87ec05d
1 /* Definitions for rtems targeting a PowerPC using elf.
2 Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005
3 Free Software Foundation, Inc.
4 Contributed by Joel Sherrill (joel@OARcorp.com).
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 /* Specify predefined symbols in preprocessor. */
25 #undef TARGET_OS_CPP_BUILTINS
26 #define TARGET_OS_CPP_BUILTINS() \
27 do \
28 { \
29 builtin_define_std ("PPC"); \
30 builtin_define ("__rtems__"); \
31 builtin_define ("__USE_INIT_FINI__"); \
32 builtin_assert ("system=rtems"); \
33 builtin_assert ("cpu=powerpc"); \
34 builtin_assert ("machine=powerpc"); \
35 TARGET_OS_SYSV_CPP_BUILTINS (); \
36 } \
37 while (0)
39 #undef CPP_OS_DEFAULT_SPEC
40 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)"
42 #define CPP_OS_RTEMS_SPEC "\
43 %{!mcpu*: %{!Dppc*: %{!Dmpc*: -Dmpc750} } }\
44 %{mcpu=403: %{!Dppc*: %{!Dmpc*: -Dppc403} } } \
45 %{mcpu=505: %{!Dppc*: %{!Dmpc*: -Dmpc505} } } \
46 %{mcpu=601: %{!Dppc*: %{!Dmpc*: -Dppc601} } } \
47 %{mcpu=602: %{!Dppc*: %{!Dmpc*: -Dppc602} } } \
48 %{mcpu=603: %{!Dppc*: %{!Dmpc*: -Dppc603} } } \
49 %{mcpu=603e: %{!Dppc*: %{!Dmpc*: -Dppc603e} } } \
50 %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
51 %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
52 %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
53 %{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
55 #undef SUBSUBTARGET_EXTRA_SPECS
56 #define SUBSUBTARGET_EXTRA_SPECS \
57 { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }