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.

215 lines
9.2 KiB

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