vx-common.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /* Target-independent configuration for VxWorks and VxWorks AE.
  2. Copyright (C) 2005-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. /* VxWorks headers are C++-aware. */
  17. #undef NO_IMPLICIT_EXTERN_C
  18. #define NO_IMPLICIT_EXTERN_C
  19. /* Most of these will probably be overridden by subsequent headers. We
  20. undefine them here just in case, and define VXWORKS_ versions of each,
  21. to be used in port-specific vxworks.h. */
  22. #undef LIB_SPEC
  23. #undef LINK_SPEC
  24. #undef LIBGCC_SPEC
  25. #define LIBGCC_SPEC VXWORKS_LIBGCC_SPEC
  26. #undef STARTFILE_SPEC
  27. #undef ENDFILE_SPEC
  28. /* Most of these macros are overridden in "config/vxworks.h" or
  29. "config/vxworksae.h" and are here merely for documentation
  30. purposes. */
  31. #define VXWORKS_ADDITIONAL_CPP_SPEC ""
  32. #define VXWORKS_LIB_SPEC ""
  33. #define VXWORKS_LINK_SPEC ""
  34. #define VXWORKS_LIBGCC_SPEC ""
  35. #define VXWORKS_STARTFILE_SPEC ""
  36. #define VXWORKS_ENDFILE_SPEC ""
  37. /* VxWorks cannot have dots in constructor labels, because it uses a
  38. mutant variation of collect2 that generates C code instead of
  39. assembly. Thus each constructor label must be a legitimate C
  40. symbol. FIXME: Have VxWorks use real collect2 instead. */
  41. #undef NO_DOLLAR_IN_LABEL
  42. #define NO_DOT_IN_LABEL
  43. /* VxWorks uses wchar_t == unsigned short (UCS2) on all architectures. */
  44. #undef WCHAR_TYPE
  45. #define WCHAR_TYPE "short unsigned int"
  46. #undef WCHAR_TYPE_SIZE
  47. #define WCHAR_TYPE_SIZE 16
  48. /* Likewise wint_t. */
  49. #undef WINT_TYPE
  50. #define WINT_TYPE "short unsigned int"
  51. #undef WINT_TYPE_SIZE
  52. #define WINT_TYPE_SIZE 16
  53. /* Dwarf2 unwind info is not supported. */
  54. #undef DWARF2_UNWIND_INFO
  55. #define DWARF2_UNWIND_INFO 0
  56. /* VxWorks uses DWARF2. */
  57. #define DWARF2_DEBUGGING_INFO 1
  58. #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
  59. /* None of these other formats is supported. */
  60. #undef DWARF_DEBUGGING_INFO
  61. #undef DBX_DEBUGGING_INFO
  62. #undef SDB_DEBUGGING_INFO
  63. #undef XCOFF_DEBUGGING_INFO
  64. #undef VMS_DEBUGGING_INFO
  65. /* Kernel mode doesn't have ctors/dtors, but RTP mode does. */
  66. #define TARGET_HAVE_CTORS_DTORS false
  67. #define VXWORKS_OVERRIDE_OPTIONS /* empty */
  68. /* No math library needed. */
  69. #define MATH_LIBRARY ""
  70. /* No profiling. */
  71. #define VXWORKS_FUNCTION_PROFILER(FILE, LABELNO) do \
  72. { \
  73. sorry ("profiler support for VxWorks"); \
  74. } while (0)
  75. /* We occasionally need to distinguish between the VxWorks variants. */
  76. #define VXWORKS_KIND_NORMAL 1
  77. #define VXWORKS_KIND_AE 2