rtems.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Definitions for rtems targeting a PowerPC using elf.
  2. Copyright (C) 1996-2015 Free Software Foundation, Inc.
  3. Contributed by Joel Sherrill (joel@OARcorp.com).
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it
  6. under the terms of the GNU General Public License as published
  7. by the Free Software Foundation; either version 3, or (at your
  8. option) any later version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GCC; see the file COPYING3. If not see
  15. <http://www.gnu.org/licenses/>. */
  16. /* Specify predefined symbols in preprocessor. */
  17. #undef TARGET_OS_CPP_BUILTINS
  18. #define TARGET_OS_CPP_BUILTINS() \
  19. do \
  20. { \
  21. builtin_define_std ("PPC"); \
  22. builtin_define ("__rtems__"); \
  23. builtin_define ("__USE_INIT_FINI__"); \
  24. builtin_assert ("system=rtems"); \
  25. builtin_assert ("cpu=powerpc"); \
  26. builtin_assert ("machine=powerpc"); \
  27. TARGET_OS_SYSV_CPP_BUILTINS (); \
  28. } \
  29. while (0)
  30. #undef TARGET_LIBGCC_SDATA_SECTION
  31. #define TARGET_LIBGCC_SDATA_SECTION ".sdata"
  32. #undef CPP_OS_DEFAULT_SPEC
  33. #define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)"
  34. #define CPP_OS_RTEMS_SPEC "\
  35. %{!mcpu*: %{!Dppc*: %{!Dmpc*: -Dmpc750} } }\
  36. %{mcpu=403: %{!Dppc*: %{!Dmpc*: -Dppc403} } } \
  37. %{mcpu=505: %{!Dppc*: %{!Dmpc*: -Dmpc505} } } \
  38. %{mcpu=601: %{!Dppc*: %{!Dmpc*: -Dppc601} } } \
  39. %{mcpu=602: %{!Dppc*: %{!Dmpc*: -Dppc602} } } \
  40. %{mcpu=603: %{!Dppc*: %{!Dmpc*: -Dppc603} } } \
  41. %{mcpu=603e: %{!Dppc*: %{!Dmpc*: -Dppc603e} } } \
  42. %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
  43. %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
  44. %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
  45. %{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
  46. %{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } } \
  47. %{mcpu=e6500: -D__PPC_CPU_E6500__}"
  48. #undef SUBSUBTARGET_EXTRA_SPECS
  49. #define SUBSUBTARGET_EXTRA_SPECS \
  50. { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }