mirror of the now-defunct rocklinux.org
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.

204 lines
5.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/rene/emacs/arch-powerpc-ptr-hack.patch-disabled
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. See the comments prior to each patch piece. Primarily, the load address was
  23. changed in gcc-2.95 for PowerPC Linux, which broke Emacs's pointer handling.
  24. The two important patches to fix that problem are DATA_SEG_BITS and
  25. EXPLICIT_SIGN_EXTEND. Most of these patches originated with the RedHat and
  26. LinuxPPC distributions. This file patches the headers for the Macintosh and
  27. IBM RS-6000 machines.
  28. -- goo (goo@radek.org)
  29. *** src/m/macppc.h.old Wed Nov 29 16:39:18 2000
  30. --- src/m/macppc.h Wed Nov 29 17:08:08 2000
  31. ***************
  32. *** 1,4 ****
  33. ! /* machine description file For the powerpc Macintosh.
  34. Copyright (C) 1994 Free Software Foundation, Inc.
  35. This file is part of GNU Emacs.
  36. --- 1,4 ----
  37. ! /* machine description file for the PowerPC Macintosh.
  38. Copyright (C) 1994 Free Software Foundation, Inc.
  39. This file is part of GNU Emacs.
  40. ***************
  41. *** 28,33 ****
  42. --- 28,44 ----
  43. #define NO_ARG_ARRAY
  44. + #if defined(__linux__) && (__GNUC__ - 0 == 2) && (__GNUC_MINOR__ >= 95)
  45. + /* gcc-2.95 on Linux/PPC changed the load address to 0x10000000 */
  46. + # define DATA_SEG_BITS 0x10000000
  47. + #endif
  48. +
  49. + /* Say this machine is a PowerPC Reference Platform */
  50. +
  51. + #ifndef prep
  52. + # define prep
  53. + #endif
  54. +
  55. /* Define WORD_MACHINE if addresses and such have
  56. * to be corrected before they can be used as byte counts. */
  57. ***************
  58. *** 38,48 ****
  59. --- 49,66 ----
  60. Ones defined so far include vax, m68000, ns16000, pyramid,
  61. orion, tahoe, APOLLO and many others */
  62. + /* This level of optimization is reported to work. */
  63. + #define C_OPTIMIZE_SWITCH -O2
  64. +
  65. /* Use type EMACS_INT rather than a union, to represent Lisp_Object */
  66. /* This is desirable for most machines. */
  67. #define NO_UNION_TYPE
  68. + /* XINT must explicitly sign-extend */
  69. +
  70. + #define EXPLICIT_SIGN_EXTEND
  71. +
  72. /* Data type of load average, as read out of kmem. */
  73. #define LOAD_AVE_TYPE long
  74. ***************
  75. *** 59,64 ****
  76. --- 77,87 ----
  77. in the file alloca.s should be used. */
  78. #define HAVE_ALLOCA
  79. + #ifndef NOT_C_CODE
  80. + # if __GNUC__ < 2 /* Modern versions of GCC handle alloca directly. */
  81. + # include <alloca.h>
  82. + # endif
  83. + #endif
  84. /* Some really obscure 4.2-based systems (like Sequent DYNIX)
  85. * do not support asynchronous I/O (using SIGIO) on sockets,
  86. ***************
  87. *** 75,81 ****
  88. /* #define NO_SOCK_SIGIO */
  89. #if defined(__NetBSD__) || defined(__OpenBSD__)
  90. ! #define ORDINARY_LINK
  91. #endif
  92. #define UNEXEC unexelf.o
  93. --- 98,104 ----
  94. /* #define NO_SOCK_SIGIO */
  95. #if defined(__NetBSD__) || defined(__OpenBSD__)
  96. ! # define ORDINARY_LINK
  97. #endif
  98. #define UNEXEC unexelf.o
  99. ***************
  100. *** 83,91 ****
  101. #define NO_TERMIO
  102. #if defined (LINUX) || defined (__NetBSD__) || defined (__OpenBSD__)
  103. ! # define TEXT_END ({ extern int _etext; &_etext; })
  104. #endif
  105. #if (defined (__NetBSD__) || defined (__OpenBSD__)) && defined (__ELF__)
  106. ! #define HAVE_TEXT_START
  107. #endif
  108. --- 106,117 ----
  109. #define NO_TERMIO
  110. #if defined (LINUX) || defined (__NetBSD__) || defined (__OpenBSD__)
  111. ! # define TEXT_END ({ extern int _etext; &_etext; })
  112. #endif
  113. #if (defined (__NetBSD__) || defined (__OpenBSD__)) && defined (__ELF__)
  114. ! # define HAVE_TEXT_START
  115. #endif
  116. +
  117. + /* Avoid .sbss, which causes undump to fail for some reason. */
  118. + #define LD_SWITCH_MACHINE -G0
  119. *** src/m/ibmrs6000.h.old Wed Nov 29 16:49:59 2000
  120. --- src/m/ibmrs6000.h Wed Nov 29 16:58:40 2000
  121. ***************
  122. *** 42,51 ****
  123. #define IBMR2AIX
  124. ! /* Use type int rather than a union, to represent Lisp_Object */
  125. /* This is desirable for most machines. */
  126. #define NO_UNION_TYPE
  127. /* Define CANNOT_DUMP on machines where unexec does not work.
  128. Then the function dump-emacs will not be defined
  129. --- 42,59 ----
  130. #define IBMR2AIX
  131. ! /* This level of optimization is reported to work. */
  132. ! #define C_OPTIMIZE_SWITCH -O2
  133. !
  134. ! /* Use type EMACS_INT rather than a union, to represent Lisp_Object */
  135. /* This is desirable for most machines. */
  136. #define NO_UNION_TYPE
  137. +
  138. + /* XINT must explicitly sign-extend */
  139. +
  140. + #define EXPLICIT_SIGN_EXTEND
  141. +
  142. /* Define CANNOT_DUMP on machines where unexec does not work.
  143. Then the function dump-emacs will not be defined
  144. ***************
  145. *** 74,82 ****
  146. we always lose the high bits. We must tell XPNTR to add them back. */
  147. #ifndef USG5_4
  148. ! #define DATA_SEG_BITS 0x20000000
  149. #else
  150. ! #define DATA_SEG_BITS 0
  151. #endif
  152. #ifdef CANNOT_DUMP
  153. --- 82,100 ----
  154. we always lose the high bits. We must tell XPNTR to add them back. */
  155. #ifndef USG5_4
  156. ! # define DATA_SEG_BITS 0x20000000
  157. #else
  158. ! # if defined(__linux__) && (__GNUC__ - 0 == 2) && (__GNUC_MINOR__ >= 95)
  159. ! /* gcc-2.95 on Linux/PPC changed the load address to 0x10000000 */
  160. ! # define DATA_SEG_BITS 0x10000000
  161. ! # else
  162. ! # define DATA_SEG_BITS 0
  163. ! # endif /* newer gcc */
  164. ! #endif
  165. !
  166. ! /* Say this machine is a PowerPC Reference Platform */
  167. ! #ifndef prep
  168. ! # define prep
  169. #endif
  170. #ifdef CANNOT_DUMP