vxworksae.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* Common VxWorks AE target definitions for GNU compiler.
  2. Copyright (C) 2004-2015 Free Software Foundation, Inc.
  3. Contributed by CodeSourcery, LLC.
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it under
  6. the terms of the GNU General Public License as published by the Free
  7. Software Foundation; either version 3, or (at your option) any later
  8. version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. 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. /* This header should be included after including vx-common.h. */
  17. /* Most of the definitions below this point are versions of the
  18. vxworks.h definitions, without the -mrtp bits. */
  19. /* Resolve subdirectory of VxWorks AE target headers. */
  20. #define VXWORKSAE_TARGET_DIR(SUBDIR) "%:getenv(WIND_BASE /target" SUBDIR ")"
  21. /* Include target/vThreads/h or target/h (depending on the compilation
  22. mode), and then target/val/h (in either mode). The macros defined
  23. are in the user's namespace, but the VxWorks headers require
  24. them. */
  25. #undef VXWORKS_ADDITIONAL_CPP_SPEC
  26. #define VXWORKS_ADDITIONAL_CPP_SPEC " \
  27. %{!nostdinc:%{isystem*}} \
  28. %{mvthreads:-DVTHREADS=1 \
  29. %{!nostdinc:-isystem " VXWORKSAE_TARGET_DIR("/vThreads/h") "}} \
  30. %{!mvthreads:-DAE653_BUILD=1 \
  31. %{!nostdinc:-isystem " VXWORKSAE_TARGET_DIR("/h") "}} \
  32. %{!nostdinc:-isystem " VXWORKSAE_TARGET_DIR("/val/h") "}"
  33. #undef VXWORKS_LIB_SPEC
  34. #define VXWORKS_LIB_SPEC ""
  35. #undef VXWORKS_LINK_SPEC
  36. #define VXWORKS_LINK_SPEC \
  37. "-r %{v:-V}"
  38. #undef VXWORKS_LIBGCC_SPEC
  39. #define VXWORKS_LIBGCC_SPEC \
  40. "-lgcc"
  41. #undef VXWORKS_STARTFILE_SPEC
  42. #define VXWORKS_STARTFILE_SPEC ""
  43. #define VXWORKS_KIND VXWORKS_KIND_AE
  44. /* Both kernels and RTPs have the facilities required by this macro. */
  45. #define TARGET_POSIX_IO
  46. /* A VxWorks 653 implementation of TARGET_OS_CPP_BUILTINS. */
  47. #define VXWORKS_OS_CPP_BUILTINS() \
  48. do \
  49. { \
  50. builtin_define ("__vxworks"); \
  51. builtin_define ("__VXWORKS__"); \
  52. } \
  53. while (0)
  54. /* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE. */
  55. #undef VXWORKS_OVERRIDE_OPTIONS
  56. #define VXWORKS_OVERRIDE_OPTIONS vxworks_override_options ()
  57. extern void vxworks_override_options (void);