OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

216 lines
9.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../hermes/gcc4.patch
  5. # Copyright (C) 2008 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. I don't know what they are doing there with the underscore thing...
  18. originally these functions should be aliased but gcc4 complains about
  19. undefined functions (?)
  20. --jsaw
  21. diff -ur Hermes-1.3.3/src/HeadMMX.h Hermes-1.3.3-t2/src/HeadMMX.h
  22. --- Hermes-1.3.3/src/HeadMMX.h 2000-12-06 05:55:28.000000000 +0100
  23. +++ Hermes-1.3.3-t2/src/HeadMMX.h 2005-11-24 14:33:42.493827611 +0100
  24. @@ -27,6 +27,26 @@
  25. extern "C" {
  26. #endif
  27. +/* Fix the underscore business with ELF compilers */
  28. +
  29. +#if defined(__ELF__) && defined(__GNUC__)
  30. +
  31. +#define ConvertMMX _ConvertMMX
  32. +#define ClearMMX_32 _ClearMMX_32
  33. +#define ClearMMX_24 _ClearMMX_24
  34. +#define ClearMMX_16 _ClearMMX_16
  35. +#define ClearMMX_8 _ClearMMX_8
  36. +#define ConvertMMXp32_16RGB555 _ConvertMMXp32_16RGB555
  37. +#define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
  38. +#define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
  39. +#define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
  40. +#define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
  41. +#define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555
  42. +
  43. +#endif /* ELF and GNUC */
  44. +
  45. +
  46. +
  47. void STACKCALL ConvertMMX(HermesConverterInterface *);
  48. void STACKCALL ClearMMX_32(HermesClearInterface *);
  49. @@ -49,35 +69,6 @@
  50. -/* Fix the underscore business with ELF compilers */
  51. -
  52. -#if defined(__ELF__) && defined(__GNUC__)
  53. - #ifdef __cplusplus
  54. - extern "C" {
  55. - #endif
  56. -
  57. - void ConvertMMX(HermesConverterInterface *) __attribute__ ((alias ("_ConvertMMX")));
  58. - void ClearMMX_32(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_32")));
  59. - void ClearMMX_24(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_24")));
  60. - void ClearMMX_16(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_16")));
  61. - void ClearMMX_8(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_8")));
  62. -
  63. - void ConvertMMXp32_16RGB555() __attribute__ ((alias ("_ConvertMMXp32_16RGB555")));
  64. -
  65. - void ConvertMMXpII32_24RGB888() __attribute__ ((alias ("_ConvertMMXpII32_24RGB888")));
  66. - void ConvertMMXpII32_16RGB565() __attribute__ ((alias ("_ConvertMMXpII32_16RGB565")));
  67. - void ConvertMMXpII32_16BGR565() __attribute__ ((alias ("_ConvertMMXpII32_16BGR565")));
  68. - void ConvertMMXpII32_16RGB555() __attribute__ ((alias ("_ConvertMMXpII32_16RGB555")));
  69. - void ConvertMMXpII32_16BGR555() __attribute__ ((alias ("_ConvertMMXpII32_16BGR555")));
  70. -
  71. - #ifdef __cplusplus
  72. - }
  73. - #endif
  74. -
  75. -#endif /* ELF and GNUC */
  76. -
  77. -
  78. -
  79. /* Make it work with Watcom */
  80. #ifdef __WATCOMC__
  81. diff -ur Hermes-1.3.3/src/HeadX86.h Hermes-1.3.3-t2/src/HeadX86.h
  82. --- Hermes-1.3.3/src/HeadX86.h 2000-12-06 05:55:28.000000000 +0100
  83. +++ Hermes-1.3.3-t2/src/HeadX86.h 2005-11-24 14:35:20.307108281 +0100
  84. @@ -27,6 +27,53 @@
  85. #endif
  86. +
  87. +
  88. +/* Now fix up the ELF underscore problem */
  89. +
  90. +#if defined(__ELF__) && defined(__GNUC__)
  91. +#define Hermes_X86_CPU _Hermes_X86_CPU
  92. +#define ConvertX86 _ConvertX86
  93. +#define ConvertX86Stretch _ConvertX86Stretch
  94. +#define ClearX86_32 _ClearX86_32
  95. +#define ClearX86_24 _ClearX86_24
  96. +#define ClearX86_16 _ClearX86_16
  97. +#define ClearX86_8 _ClearX86_8
  98. +#define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888
  99. +#define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888
  100. +#define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888
  101. +#define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888
  102. +#define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888
  103. +#define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565
  104. +#define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565
  105. +#define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555
  106. +#define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555
  107. +#define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332
  108. +#define ConvertX86p32_16RGB565_S _ConvertX86p32_16RGB565_S
  109. +#define ConvertX86p16_32RGB888 _ConvertX86p16_32RGB888
  110. +#define ConvertX86p16_32BGR888 _ConvertX86p16_32BGR888
  111. +#define ConvertX86p16_32RGBA888 _ConvertX86p16_32RGBA888
  112. +#define ConvertX86p16_32BGRA888 _ConvertX86p16_32BGRA888
  113. +#define ConvertX86p16_24RGB888 _ConvertX86p16_24RGB888
  114. +#define ConvertX86p16_24BGR888 _ConvertX86p16_24BGR888
  115. +#define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565
  116. +#define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555
  117. +#define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555
  118. +#define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332
  119. +#define CopyX86p_4byte _CopyX86p_4byte
  120. +#define CopyX86p_3byte _CopyX86p_3byte
  121. +#define CopyX86p_2byte _CopyX86p_2byte
  122. +#define CopyX86p_1byte _CopyX86p_1byte
  123. +#define ConvertX86pI8_32 _ConvertX86pI8_32
  124. +#define ConvertX86pI8_24 _ConvertX86pI8_24
  125. +#define ConvertX86pI8_16 _ConvertX86pI8_16
  126. +#define ConvertX86p16_32RGB888_LUT_X86 _ConvertX86p16_32RGB888_LUT_X86
  127. +#define ConvertX86p16_32BGR888_LUT_X86 _ConvertX86p16_32BGR888_LUT_X86
  128. +#define ConvertX86p16_32RGBA888_LUT_X86 _ConvertX86p16_32RGBA888_LUT_X86
  129. +#define ConvertX86p16_32BGRA888_LUT_X86 _ConvertX86p16_32BGRA888_LUT_X86
  130. +#endif /* ELF & GNU */
  131. +
  132. +
  133. void STACKCALL ConvertX86(HermesConverterInterface *);
  134. void STACKCALL ConvertX86Stretch(HermesConverterInterface *);
  135. void STACKCALL ClearX86_32(HermesClearInterface *);
  136. @@ -81,70 +128,6 @@
  137. -/* Now fix up the ELF underscore problem */
  138. -
  139. -#if defined(__ELF__) && defined(__GNUC__)
  140. - #ifdef __cplusplus
  141. - extern "C" {
  142. - #endif
  143. -
  144. - int Hermes_X86_CPU() __attribute__ ((alias ("_Hermes_X86_CPU")));
  145. -
  146. - void ConvertX86(HermesConverterInterface *) __attribute__ ((alias ("_ConvertX86")));
  147. - void ConvertX86Stretch(HermesConverterInterface *) __attribute__ ((alias ("_ConvertX86Stretch")));
  148. -
  149. - void ClearX86_32(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_32")));
  150. - void ClearX86_24(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_24")));
  151. - void ClearX86_16(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_16")));
  152. - void ClearX86_8(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_8")));
  153. -
  154. -
  155. - void ConvertX86p32_32BGR888() __attribute__ ((alias ("_ConvertX86p32_32BGR888")));
  156. - void ConvertX86p32_32RGBA888() __attribute__ ((alias ("_ConvertX86p32_32RGBA888")));
  157. - void ConvertX86p32_32BGRA888() __attribute__ ((alias ("_ConvertX86p32_32BGRA888")));
  158. - void ConvertX86p32_24RGB888() __attribute__ ((alias ("_ConvertX86p32_24RGB888")));
  159. - void ConvertX86p32_24BGR888() __attribute__ ((alias ("_ConvertX86p32_24BGR888")));
  160. - void ConvertX86p32_16RGB565() __attribute__ ((alias ("_ConvertX86p32_16RGB565")));
  161. - void ConvertX86p32_16BGR565() __attribute__ ((alias ("_ConvertX86p32_16BGR565")));
  162. - void ConvertX86p32_16RGB555() __attribute__ ((alias ("_ConvertX86p32_16RGB555")));
  163. - void ConvertX86p32_16BGR555() __attribute__ ((alias ("_ConvertX86p32_16BGR555")));
  164. - void ConvertX86p32_8RGB332() __attribute__ ((alias ("_ConvertX86p32_8RGB332")));
  165. -
  166. - void ConvertX86p32_16RGB565_S() __attribute__ ((alias ("_ConvertX86p32_16RGB565_S")));
  167. -
  168. - void ConvertX86p16_32RGB888() __attribute__ ((alias ("_ConvertX86p16_32RGB888")));
  169. - void ConvertX86p16_32BGR888() __attribute__ ((alias ("_ConvertX86p16_32BGR888")));
  170. - void ConvertX86p16_32RGBA888() __attribute__ ((alias ("_ConvertX86p16_32RGBA888")));
  171. - void ConvertX86p16_32BGRA888() __attribute__ ((alias ("_ConvertX86p16_32BGRA888")));
  172. - void ConvertX86p16_24RGB888() __attribute__ ((alias ("_ConvertX86p16_24RGB888")));
  173. - void ConvertX86p16_24BGR888() __attribute__ ((alias ("_ConvertX86p16_24BGR888")));
  174. - void ConvertX86p16_16BGR565() __attribute__ ((alias ("_ConvertX86p16_16BGR565")));
  175. - void ConvertX86p16_16RGB555() __attribute__ ((alias ("_ConvertX86p16_16RGB555")));
  176. - void ConvertX86p16_16BGR555() __attribute__ ((alias ("_ConvertX86p16_16BGR555")));
  177. - void ConvertX86p16_8RGB332() __attribute__ ((alias ("_ConvertX86p16_8RGB332")));
  178. -
  179. - void CopyX86p_4byte() __attribute__ ((alias ("_CopyX86p_4byte")));
  180. - void CopyX86p_3byte() __attribute__ ((alias ("_CopyX86p_3byte")));
  181. - void CopyX86p_2byte() __attribute__ ((alias ("_CopyX86p_2byte")));
  182. - void CopyX86p_1byte() __attribute__ ((alias ("_CopyX86p_1byte")));
  183. -
  184. - void ConvertX86pI8_32() __attribute__ ((alias ("_ConvertX86pI8_32")));
  185. - void ConvertX86pI8_24() __attribute__ ((alias ("_ConvertX86pI8_24")));
  186. - void ConvertX86pI8_16() __attribute__ ((alias ("_ConvertX86pI8_16")));
  187. -
  188. - extern int32 ConvertX86p16_32RGB888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGB888_LUT_X86")));
  189. - extern int32 ConvertX86p16_32BGR888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGR888_LUT_X86")));
  190. - extern int32 ConvertX86p16_32RGBA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGBA888_LUT_X86")));
  191. - extern int32 ConvertX86p16_32BGRA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGRA888_LUT_X86")));
  192. -
  193. - #ifdef __cplusplus
  194. - }
  195. - #endif
  196. -
  197. -#endif /* ELF & GNU */
  198. -
  199. -
  200. -
  201. /* Make it run with WATCOM C */
  202. #ifdef __WATCOMC__
  203. #pragma warning 601 9