patch-gcc_ada_gcc-interface_Makefile_in 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. $OpenBSD: patch-gcc_ada_gcc-interface_Makefile_in,v 1.4 2016/12/28 21:48:21 pascal Exp $
  2. --- gcc/ada/gcc-interface/Makefile.in.orig Tue Oct 11 22:03:58 2016
  3. +++ gcc/ada/gcc-interface/Makefile.in Fri Dec 23 18:24:59 2016
  4. @@ -419,6 +419,10 @@ ATOMICS_TARGET_PAIRS = \
  5. a-szunau.adb<a-szunau-shared.adb \
  6. a-szuzti.adb<a-szuzti-shared.adb
  7. +# Disable shared strings because of overlapping memcpy issue
  8. +# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64057
  9. +ATOMICS_TARGET_PAIRS =
  10. +
  11. ATOMICS_BUILTINS_TARGET_PAIRS = \
  12. s-atocou.adb<s-atocou-builtin.adb
  13. @@ -1505,6 +1509,252 @@ ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu)
  14. MISCLIB = -lutil
  15. endif
  16. +ifeq ($(strip $(filter-out arm openbsd%,$(target_cpu) $(target_os))),)
  17. + LIBGNAT_TARGET_PAIRS = \
  18. + a-intnam.ads<a-intnam-freebsd.ads \
  19. + s-inmaop.adb<s-inmaop-posix.adb \
  20. + s-intman.adb<s-intman-posix.adb \
  21. + s-osinte.ads<s-osinte-openbsd.ads \
  22. + s-osinte.adb<s-osinte-openbsd.adb \
  23. + s-osprim.adb<s-osprim-posix.adb \
  24. + s-taprop.adb<s-taprop-posix.adb \
  25. + s-taspri.ads<s-taspri-posix.ads \
  26. + s-tpopsp.adb<s-tpopsp-posix.adb \
  27. + $(ATOMICS_TARGET_PAIRS) \
  28. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  29. + system.ads<system-openbsd-arm.ads
  30. +
  31. + TOOLS_TARGET_PAIRS = \
  32. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  33. + GNATLIB_SHARED = gnatlib-shared-dual
  34. +
  35. + # Empty when not using ZCX
  36. + EH_MECHANISM=
  37. + THREADSLIB= -lpthread
  38. + GMEM_LIB = gmemlib
  39. + LIBRARY_VERSION := $(LIB_VERSION)
  40. + MISCLIB = -lutil
  41. +endif
  42. +
  43. +ifeq ($(strip $(filter-out %86 openbsd%,$(target_cpu) $(target_os))),)
  44. + LIBGNAT_TARGET_PAIRS = \
  45. + a-intnam.ads<a-intnam-freebsd.ads \
  46. + s-inmaop.adb<s-inmaop-posix.adb \
  47. + s-intman.adb<s-intman-posix.adb \
  48. + s-osinte.ads<s-osinte-openbsd.ads \
  49. + s-osinte.adb<s-osinte-openbsd.adb \
  50. + s-osprim.adb<s-osprim-posix.adb \
  51. + s-taprop.adb<s-taprop-posix.adb \
  52. + s-taspri.ads<s-taspri-posix.ads \
  53. + s-tpopsp.adb<s-tpopsp-posix.adb \
  54. + $(ATOMICS_TARGET_PAIRS) \
  55. + $(X86_TARGET_PAIRS) \
  56. + system.ads<system-openbsd-x86.ads
  57. +
  58. + TOOLS_TARGET_PAIRS = \
  59. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  60. + GNATLIB_SHARED = gnatlib-shared-dual
  61. +
  62. + # Empty when not using ZCX
  63. + EH_MECHANISM=
  64. + THREADSLIB= -lpthread
  65. + GMEM_LIB = gmemlib
  66. + LIBRARY_VERSION := $(LIB_VERSION)
  67. + MISCLIB = -lutil
  68. +endif
  69. +
  70. +ifeq ($(strip $(filter-out %86_64 openbsd%,$(target_cpu) $(target_os))),)
  71. + LIBGNAT_TARGET_PAIRS = \
  72. + a-intnam.ads<a-intnam-freebsd.ads \
  73. + s-inmaop.adb<s-inmaop-posix.adb \
  74. + s-intman.adb<s-intman-posix.adb \
  75. + s-osinte.ads<s-osinte-openbsd.ads \
  76. + s-osinte.adb<s-osinte-openbsd.adb \
  77. + s-osprim.adb<s-osprim-posix.adb \
  78. + s-taprop.adb<s-taprop-posix.adb \
  79. + s-taspri.ads<s-taspri-posix.ads \
  80. + s-tpopsp.adb<s-tpopsp-posix.adb \
  81. + $(ATOMICS_TARGET_PAIRS) \
  82. + $(X86_64_TARGET_PAIRS) \
  83. + system.ads<system-openbsd-x86_64.ads
  84. +
  85. + TOOLS_TARGET_PAIRS = \
  86. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  87. + GNATLIB_SHARED = gnatlib-shared-dual
  88. +
  89. + # Empty when not using ZCX
  90. + EH_MECHANISM=
  91. + THREADSLIB= -lpthread
  92. + GMEM_LIB = gmemlib
  93. + LIBRARY_VERSION := $(LIB_VERSION)
  94. + MISCLIB = -lutil
  95. +endif
  96. +
  97. +ifeq ($(strip $(filter-out sparc64 openbsd%,$(target_cpu) $(target_os))),)
  98. + LIBGNAT_TARGET_PAIRS = \
  99. + a-intnam.ads<a-intnam-freebsd.ads \
  100. + s-inmaop.adb<s-inmaop-posix.adb \
  101. + s-intman.adb<s-intman-posix.adb \
  102. + s-osinte.ads<s-osinte-openbsd.ads \
  103. + s-osinte.adb<s-osinte-openbsd.adb \
  104. + s-osprim.adb<s-osprim-posix.adb \
  105. + s-taprop.adb<s-taprop-posix.adb \
  106. + s-taspri.ads<s-taspri-posix.ads \
  107. + s-tpopsp.adb<s-tpopsp-posix.adb \
  108. + $(ATOMICS_TARGET_PAIRS) \
  109. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  110. + system.ads<system-openbsd-sparcv9.ads
  111. +
  112. + TOOLS_TARGET_PAIRS = \
  113. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  114. + GNATLIB_SHARED = gnatlib-shared-dual
  115. +
  116. + # Empty when not using ZCX
  117. + EH_MECHANISM=
  118. + THREADSLIB= -lpthread
  119. + GMEM_LIB = gmemlib
  120. + LIBRARY_VERSION := $(LIB_VERSION)
  121. + MISCLIB = -lutil
  122. +endif
  123. +
  124. +ifeq ($(strip $(filter-out sparc openbsd%,$(target_cpu) $(target_os))),)
  125. + LIBGNAT_TARGET_PAIRS = \
  126. + a-intnam.ads<a-intnam-freebsd.ads \
  127. + s-inmaop.adb<s-inmaop-posix.adb \
  128. + s-intman.adb<s-intman-posix.adb \
  129. + s-osinte.ads<s-osinte-openbsd.ads \
  130. + s-osinte.adb<s-osinte-openbsd.adb \
  131. + s-osprim.adb<s-osprim-posix.adb \
  132. + s-taprop.adb<s-taprop-posix.adb \
  133. + s-taspri.ads<s-taspri-posix.ads \
  134. + s-tpopsp.adb<s-tpopsp-posix.adb \
  135. + $(ATOMICS_TARGET_PAIRS) \
  136. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  137. + system.ads<system-openbsd-sparc.ads
  138. +
  139. + TOOLS_TARGET_PAIRS = \
  140. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  141. + GNATLIB_SHARED = gnatlib-shared-dual
  142. +
  143. + # Empty when not using ZCX
  144. + EH_MECHANISM=
  145. + THREADSLIB= -lpthread
  146. + GMEM_LIB = gmemlib
  147. + LIBRARY_VERSION := $(LIB_VERSION)
  148. + MISCLIB = -lutil
  149. +endif
  150. +
  151. +ifeq ($(strip $(filter-out powerpc openbsd%,$(target_cpu) $(target_os))),)
  152. + LIBGNAT_TARGET_PAIRS = \
  153. + a-intnam.ads<a-intnam-freebsd.ads \
  154. + s-inmaop.adb<s-inmaop-posix.adb \
  155. + s-intman.adb<s-intman-posix.adb \
  156. + s-osinte.ads<s-osinte-openbsd.ads \
  157. + s-osinte.adb<s-osinte-openbsd.adb \
  158. + s-osprim.adb<s-osprim-posix.adb \
  159. + s-taprop.adb<s-taprop-posix.adb \
  160. + s-taspri.ads<s-taspri-posix.ads \
  161. + s-tpopsp.adb<s-tpopsp-posix.adb \
  162. + $(ATOMICS_TARGET_PAIRS) \
  163. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  164. + system.ads<system-openbsd-ppc.ads
  165. +
  166. + TOOLS_TARGET_PAIRS = \
  167. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  168. + GNATLIB_SHARED = gnatlib-shared-dual
  169. +
  170. + # Empty when not using ZCX
  171. + EH_MECHANISM=
  172. + THREADSLIB= -lpthread
  173. + GMEM_LIB = gmemlib
  174. + LIBRARY_VERSION := $(LIB_VERSION)
  175. + MISCLIB = -lutil
  176. +endif
  177. +
  178. +ifeq ($(strip $(filter-out mips64 openbsd%,$(target_cpu) $(target_os))),)
  179. + LIBGNAT_TARGET_PAIRS = \
  180. + a-intnam.ads<a-intnam-freebsd.ads \
  181. + s-inmaop.adb<s-inmaop-posix.adb \
  182. + s-intman.adb<s-intman-posix.adb \
  183. + s-osinte.ads<s-osinte-openbsd.ads \
  184. + s-osinte.adb<s-osinte-openbsd.adb \
  185. + s-osprim.adb<s-osprim-posix.adb \
  186. + s-taprop.adb<s-taprop-posix.adb \
  187. + s-taspri.ads<s-taspri-posix.ads \
  188. + s-tpopsp.adb<s-tpopsp-posix.adb \
  189. + $(ATOMICS_TARGET_PAIRS) \
  190. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  191. + system.ads<system-openbsd-mips64.ads
  192. +
  193. + TOOLS_TARGET_PAIRS = \
  194. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  195. + GNATLIB_SHARED = gnatlib-shared-dual
  196. +
  197. + # Empty when not using ZCX
  198. + EH_MECHANISM=
  199. + THREADSLIB= -lpthread
  200. + GMEM_LIB = gmemlib
  201. + LIBRARY_VERSION := $(LIB_VERSION)
  202. + MISCLIB = -lutil
  203. +endif
  204. +
  205. +ifeq ($(strip $(filter-out mips64el openbsd%,$(target_cpu) $(target_os))),)
  206. + LIBGNAT_TARGET_PAIRS = \
  207. + a-intnam.ads<a-intnam-freebsd.ads \
  208. + s-inmaop.adb<s-inmaop-posix.adb \
  209. + s-intman.adb<s-intman-posix.adb \
  210. + s-osinte.ads<s-osinte-openbsd.ads \
  211. + s-osinte.adb<s-osinte-openbsd.adb \
  212. + s-osprim.adb<s-osprim-posix.adb \
  213. + s-taprop.adb<s-taprop-posix.adb \
  214. + s-taspri.ads<s-taspri-posix.ads \
  215. + s-tpopsp.adb<s-tpopsp-posix.adb \
  216. + $(ATOMICS_TARGET_PAIRS) \
  217. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  218. + system.ads<system-openbsd-mips64el.ads
  219. +
  220. + TOOLS_TARGET_PAIRS = \
  221. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  222. + GNATLIB_SHARED = gnatlib-shared-dual
  223. +
  224. + # Empty when not using ZCX
  225. + EH_MECHANISM=
  226. + THREADSLIB= -lpthread
  227. + GMEM_LIB = gmemlib
  228. + LIBRARY_VERSION := $(LIB_VERSION)
  229. + MISCLIB = -lutil
  230. +endif
  231. +
  232. +ifeq ($(strip $(filter-out hppa openbsd%,$(target_cpu) $(target_os))),)
  233. + ATOMICS_BUILTINS_TARGET_PAIRS = \
  234. + s-atocou.adb<s-atocou.adb
  235. +
  236. + LIBGNAT_TARGET_PAIRS = \
  237. + a-intnam.ads<a-intnam-freebsd.ads \
  238. + s-inmaop.adb<s-inmaop-posix.adb \
  239. + s-intman.adb<s-intman-posix.adb \
  240. + s-osinte.ads<s-osinte-openbsd.ads \
  241. + s-osinte.adb<s-osinte-openbsd.adb \
  242. + s-osprim.adb<s-osprim-posix.adb \
  243. + s-taprop.adb<s-taprop-posix.adb \
  244. + s-taspri.ads<s-taspri-posix.ads \
  245. + s-tpopsp.adb<s-tpopsp-posix.adb \
  246. + $(ATOMICS_TARGET_PAIRS) \
  247. + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
  248. + system.ads<system-openbsd-hppa.ads
  249. +
  250. + TOOLS_TARGET_PAIRS = \
  251. + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
  252. + GNATLIB_SHARED = gnatlib-shared-dual
  253. +
  254. + # Empty when not using ZCX
  255. + EH_MECHANISM=
  256. + THREADSLIB= -lpthread
  257. + GMEM_LIB = gmemlib
  258. + LIBRARY_VERSION := $(LIB_VERSION)
  259. + MISCLIB = -lutil
  260. +endif
  261. +
  262. # x86-64 FreeBSD
  263. ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
  264. LIBGNAT_TARGET_PAIRS = \
  265. @@ -2447,7 +2697,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o
  266. # from ADA_INCLUDE_SRCS.
  267. LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS)) \
  268. - adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h \
  269. + adadecode.h adaint.h env.h gsocket.h raise.h \
  270. tb-gcc.c thread.c $(EXTRA_LIBGNAT_SRCS)
  271. # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in