patch-gcc_config_rs6000_openbsd_h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. $OpenBSD: patch-gcc_config_rs6000_openbsd_h,v 1.1.1.1 2016/09/04 16:20:17 pascal Exp $
  2. --- gcc/config/rs6000/openbsd.h.orig Fri Nov 15 12:47:25 2013
  3. +++ gcc/config/rs6000/openbsd.h Fri Nov 15 12:49:07 2013
  4. @@ -0,0 +1,129 @@
  5. +/* Configuration file for an rs6000 OpenBSD target.
  6. + Copyright (C) 1999 Free Software Foundation, Inc.
  7. +
  8. +This file is part of GNU CC.
  9. +
  10. +GNU CC is free software; you can redistribute it and/or modify
  11. +it under the terms of the GNU General Public License as published by
  12. +the Free Software Foundation; either version 2, or (at your option)
  13. +any later version.
  14. +
  15. +GNU CC is distributed in the hope that it will be useful,
  16. +but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. +GNU General Public License for more details.
  19. +
  20. +You should have received a copy of the GNU General Public License
  21. +along with GNU CC; see the file COPYING. If not, write to
  22. +the Free Software Foundation, 59 Temple Place - Suite 330,
  23. +Boston, MA 02111-1307, USA. */
  24. +
  25. +/* XXX need to check ASM_WEAKEN_LABEL/ASM_GLOBALIZE_LABEL. */
  26. +
  27. +/* Run-time target specifications. */
  28. +#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
  29. +#define TARGET_OS_CPP_BUILTINS() \
  30. + do \
  31. + { \
  32. + OPENBSD_OS_CPP_BUILTINS_ELF(); \
  33. + builtin_define ("__PPC"); \
  34. + builtin_define ("__PPC__"); \
  35. + builtin_define ("__powerpc"); \
  36. + builtin_define ("__powerpc__"); \
  37. + builtin_assert ("cpu=powerpc"); \
  38. + builtin_assert ("machine=powerpc"); \
  39. + } \
  40. + while (0)
  41. +
  42. +/* Override the default from rs6000.h to avoid conflicts with macros
  43. + defined in OpenBSD header files. */
  44. +
  45. +#undef RS6000_CPU_CPP_ENDIAN_BUILTINS
  46. +#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
  47. + do \
  48. + { \
  49. + if (BYTES_BIG_ENDIAN) \
  50. + { \
  51. + builtin_define ("__BIG_ENDIAN__"); \
  52. + builtin_assert ("machine=bigendian"); \
  53. + } \
  54. + else \
  55. + { \
  56. + builtin_define ("__LITTLE_ENDIAN__"); \
  57. + builtin_assert ("machine=littleendian"); \
  58. + } \
  59. + } \
  60. + while (0)
  61. +
  62. +#undef CPP_OS_DEFAULT_SPEC
  63. +#define CPP_OS_DEFAULT_SPEC "%(cpp_os_openbsd)"
  64. +
  65. +#undef LINK_SPEC
  66. +#define LINK_SPEC "%{shared:-shared} \
  67. + %{!shared: \
  68. + %{!static: \
  69. + %{rdynamic:-export-dynamic} \
  70. + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}} \
  71. + %{static:-static}}"
  72. +
  73. +#undef LIB_DEFAULT_SPEC
  74. +#define LIB_DEFAULT_SPEC "%(lib_openbsd)"
  75. +
  76. +#undef STARTFILE_DEFAULT_SPEC
  77. +#define STARTFILE_DEFAULT_SPEC "%(startfile_openbsd)"
  78. +
  79. +#undef CRTSAVRES_DEFAULT_SPEC
  80. +#define CRTSAVRES_DEFAULT_SPEC ""
  81. +
  82. +#undef ENDFILE_DEFAULT_SPEC
  83. +#define ENDFILE_DEFAULT_SPEC "%(endfile_openbsd)"
  84. +
  85. +#undef LINK_START_DEFAULT_SPEC
  86. +#define LINK_START_DEFAULT_SPEC "%(link_start_openbsd)"
  87. +
  88. +#undef LINK_OS_DEFAULT_SPEC
  89. +#define LINK_OS_DEFAULT_SPEC "%(link_os_openbsd)"
  90. +
  91. +/* Default ABI to use */
  92. +#undef RS6000_ABI_NAME
  93. +#define RS6000_ABI_NAME "openbsd"
  94. +
  95. +/* Define this macro as a C expression for the initializer of an
  96. + array of string to tell the driver program which options are
  97. + defaults for this target and thus do not need to be handled
  98. + specially when using `MULTILIB_OPTIONS'.
  99. +
  100. + Do not define this macro if `MULTILIB_OPTIONS' is not defined in
  101. + the target makefile fragment or if none of the options listed in
  102. + `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
  103. +
  104. +#undef MULTILIB_DEFAULTS
  105. +#define MULTILIB_DEFAULTS { "mbig", "mcall-openbsd" }
  106. +
  107. +/* collect2 support (Macros for initialization). */
  108. +
  109. +
  110. +/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
  111. + library with the proper functions to handle this -> collect2 will
  112. + default to using nm. */
  113. +#undef OBJECT_FORMAT_COFF
  114. +
  115. +/* Some code gets optimized incorrectly by move_movables() in loop.c */
  116. +#define BROKEN_MOVE_MOVABLES_P
  117. +
  118. +/* This must agree with <machine/_types.h> */
  119. +#undef SIZE_TYPE
  120. +#define SIZE_TYPE "long unsigned int"
  121. +
  122. +#undef PTRDIFF_TYPE
  123. +#define PTRDIFF_TYPE "long int"
  124. +
  125. +#undef WCHAR_TYPE
  126. +#define WCHAR_TYPE "int"
  127. +
  128. +#undef WCHAR_TYPE_SIZE
  129. +#define WCHAR_TYPE_SIZE 32
  130. +
  131. +#undef TRAMPOLINE_SIZE
  132. +#define TRAMPOLINE_SIZE 40
  133. +