home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / sources / tools / gcc_2_7_2_ / gcc-2.7.2-riscbsd.diff
Text File  |  1996-03-08  |  10KB  |  266 lines

  1. diff -N -c -r gcc-2.7.2/collect2.c gcc-2.7.2-riscbsd/collect2.c
  2. *** gcc-2.7.2/collect2.c    Tue Sep 12 18:08:27 1995
  3. --- gcc-2.7.2-riscbsd/collect2.c    Mon Mar  4 04:32:40 1996
  4. ***************
  5. *** 1123,1128 ****
  6. --- 1122,1129 ----
  7.     /* Likewise for `collect-ld'.  */
  8.     if (ld_file_name == 0)
  9.       ld_file_name = find_a_file (&cpath, collect_ld_suffix);
  10. +   if (ld_file_name == 0)
  11. +     ld_file_name = find_a_file (&path, real_ld_suffix);
  12.     /* Search the compiler directories for `ld'.  We have protection against
  13.        recursive calls in find_a_file.  */
  14.     if (ld_file_name == 0)
  15. diff -N -c -r gcc-2.7.2/config/arm/arm.md gcc-2.7.2-riscbsd/config/arm/arm.md
  16. *** gcc-2.7.2/config/arm/arm.md    Wed Nov  8 13:59:00 1995
  17. --- gcc-2.7.2-riscbsd/config/arm/arm.md    Sat Mar  2 04:27:19 1996
  18. ***************
  19. *** 3319,3325 ****
  20.       (if_then_else (match_operand 1 "comparison_operator" "")
  21.                 (match_operand:SI 2 "arm_not_operand" "")
  22.                 (match_operand:SI 3 "register_operand" "")))]
  23. !   ""
  24.     "
  25.   {
  26.     enum rtx_code code = GET_CODE (operands[1]);
  27. --- 3319,3325 ----
  28.       (if_then_else (match_operand 1 "comparison_operator" "")
  29.                 (match_operand:SI 2 "arm_not_operand" "")
  30.                 (match_operand:SI 3 "register_operand" "")))]
  31. !   "0"
  32.     "
  33.   {
  34.     enum rtx_code code = GET_CODE (operands[1]);
  35. diff -N -c -r gcc-2.7.2/config/arm/netbsd.h gcc-2.7.2-riscbsd/config/arm/netbsd.h
  36. *** gcc-2.7.2/config/arm/netbsd.h    Thu Jan  1 01:00:00 1970
  37. --- gcc-2.7.2-riscbsd/config/arm/netbsd.h    Sat Mar  2 04:39:47 1996
  38. ***************
  39. *** 0 ****
  40. --- 1,141 ----
  41. + /* Definitions of target machine for GNU compiler.
  42. +    NetBSD/arm (RiscBSD) version.
  43. +    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
  44. +    Contributed by Mark Brinicombe (amb@physig.ph.kcl.ac.uk)
  45. + This file is part of GNU CC.
  46. + GNU CC is free software; you can redistribute it and/or modify
  47. + it under the terms of the GNU General Public License as published by
  48. + the Free Software Foundation; either version 2, or (at your option)
  49. + any later version.
  50. + GNU CC is distributed in the hope that it will be useful,
  51. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  52. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  53. + GNU General Public License for more details.
  54. + You should have received a copy of the GNU General Public License
  55. + along with GNU CC; see the file COPYING.  If not, write to
  56. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  57. + /* Ok it either ARM2 or ARM3 code is produced we need to define the
  58. +  * appropriate symbol and delete the ARM6 symbol
  59. +  */
  60. +  
  61. + /* Run-time Target Specification.  */
  62. + #define TARGET_VERSION fputs (" (ARM/NetBSD)", stderr);
  63. + /* This is used in ASM_FILE_START */
  64. + #define ARM_OS_NAME "NetBSD"
  65. + /* Unsigned chars produces much better code than signed.  */
  66. + #define DEFAULT_SIGNED_CHAR  0
  67. + /* ARM600 default cpu */
  68. + #define TARGET_DEFAULT 8
  69. + /* Since we always use GAS as our assembler we support stabs */
  70. + #define DBX_DEBUGGING_INFO 1
  71. + /*#undef ASM_DECLARE_FUNCTION_NAME*/
  72. + #include "arm/arm.h"
  73. + /* Gets redefined in config/netbsd.h */
  74. + #undef TARGET_MEM_FUNCTIONS
  75. + #include <netbsd.h>
  76. + /* Ok some nice defines for CPP
  77. +    By default we define arm32 __arm32__ and __arm6__
  78. +    However if we are compiling 26 bit code -m2 or -m3 then
  79. +    we remove all these definitions.
  80. +    The arm32 and __arm32__ defines indication that the compiler
  81. +    is generating 32 bit address space code.
  82. +    The __arm2__ __arm3__ and __arm6__ are obvious. */
  83. + #undef CPP_PREDEFINES
  84. + #define CPP_PREDEFINES "-Dunix -Darm32 -D__arm32__ -D__arm6__ -Driscbsd -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(arm) -Amachine(arm)"
  85. + #undef CPP_SPEC
  86. + #define CPP_SPEC "%{m2:-D__arm2__} %{m3:-D__arm3__} %{m2:-U__arm6__}    \
  87. +     %{m3:-U__arm6__} %{m2:-U__arm32__} %{m3:-U__arm32__}        \
  88. +      %{m2:-Uarm32} %{m3:-Uarm32}                    \
  89. +     %{posix:-D_POSIX_SOURCE}"
  90. + #undef SIZE_TYPE
  91. + #define SIZE_TYPE "unsigned int"
  92. + #undef PTRDIFF_TYPE
  93. + #define PTRDIFF_TYPE "int"
  94. + #undef WCHAR_TYPE
  95. + #define WCHAR_TYPE "int"
  96. + #undef WCHAR_UNSIGNED
  97. + #define WCHAR_UNSIGNED 0
  98. + #undef WCHAR_TYPE_SIZE
  99. + #define WCHAR_TYPE_SIZE 32
  100. + #define HANDLE_SYSV_PRAGMA
  101. + /* We don't have any limit on the length as out debugger is GDB */
  102. + #undef DBX_CONTIN_LENGTH
  103. + /* NetBSD does its profiling differently to the Acorn compiler. We don't need
  104. +    a word following mcount call and to skip if requires an assembly stub of
  105. +    use of fomit-frame-pointer when compiling the profiling functions.
  106. +    Since we break Acorn CC compatibility below a little more won't hurt */
  107. + #undef FUNCTION_PROFILER
  108. + #define FUNCTION_PROFILER(STREAM,LABELNO)                      \
  109. + {                                        \
  110. +     fprintf(STREAM, "\tmov\t%sip, %slr\n", REGISTER_PREFIX, REGISTER_PREFIX); \
  111. +     fprintf(STREAM, "\tbl\tmcount\n");                        \
  112. + }
  113. + /* VERY BIG NOTE : Change of structure alignment for RiscBSD.
  114. +    There are consequences you should be aware of */
  115. + /* Normally GCC/arm uses a structure alignment of 32. This means that
  116. +    structures are padded to a word boundry. However this causes
  117. +    problems with bugged NetBSD kernel code (possible userland code
  118. +    as well - I have not checked every binary).
  119. +    The nature of this the bugged code is to rely on sizeof() returning
  120. +    the correct size of various structures rounded to the nearest byte
  121. +    (SCSI and ether code are two examples, the vm system is another)
  122. +    This code starts to break when the structure alignment is 32 as sizeof()
  123. +    will report a word rounded size.
  124. +    By changing the structure alignment to 8. GCC will conform to what
  125. +    is expected by NetBSD.
  126. +    This has several side effects that should be considered.
  127. +    1. Structures will only be aligned to the size of the largest member.
  128. +       i.e. structures containing only bytes will be byte aligned.
  129. +            structures containing shorts will be half word alinged.
  130. +            structures containing ints will be word aligned.
  131. +       This means structures should be padded to a word boundry if
  132. +       alignment of 32 is require for byte structures etc.
  133. +       
  134. +    2. A potential performance penalty may exist if strings are no longer
  135. +       word aligned. GCC will not be able to use word load/stores for copy
  136. +       short strings.
  137. +       
  138. +    This modification is not encouraged but with the present state of the
  139. +    NetBSD source tree it is currently the only solution to meet the
  140. +    requirements.
  141. + */
  142. + #undef STRUCTURE_SIZE_BOUNDARY
  143. + #define STRUCTURE_SIZE_BOUNDARY 8
  144. diff -N -c -r gcc-2.7.2/config/arm/t-netbsd gcc-2.7.2-riscbsd/config/arm/t-netbsd
  145. *** gcc-2.7.2/config/arm/t-netbsd    Thu Jan  1 01:00:00 1970
  146. --- gcc-2.7.2-riscbsd/config/arm/t-netbsd    Sat Mar  2 03:57:21 1996
  147. ***************
  148. *** 0 ****
  149. --- 1,11 ----
  150. + # Just for these, we omit the frame pointer since it makes such a big
  151. + # difference.  It is then pointless adding debugging.
  152. + LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
  153. + #    -Dinhibit_libc
  154. + # Don't build enquire
  155. + ENQUIRE=
  156. + CROSS_LIBGCC1 = libgcc1-asm.a
  157. + LIB1ASMSRC = arm/lib1funcs.asm
  158. + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls
  159. diff -N -c -r gcc-2.7.2/config/arm/xm-netbsd.h gcc-2.7.2-riscbsd/config/arm/xm-netbsd.h
  160. *** gcc-2.7.2/config/arm/xm-netbsd.h    Thu Jan  1 01:00:00 1970
  161. --- gcc-2.7.2-riscbsd/config/arm/xm-netbsd.h    Sat Mar  2 04:39:09 1996
  162. ***************
  163. *** 0 ****
  164. --- 1,10 ----
  165. + /* Configuration for GCC for ARM running NetBSD as host.  */
  166. + #include <arm/xm-arm.h>
  167. + /* xm-netbsd.h defines this */
  168. + #ifdef HAVE_VPRINTF
  169. + #undef HAVE_VPRINTF
  170. + #endif
  171. + #include <xm-netbsd.h>
  172. diff -N -c -r gcc-2.7.2/config.status gcc-2.7.2-riscbsd/config.status
  173. *** gcc-2.7.2/config.status    Thu Jan  1 01:00:00 1970
  174. --- gcc-2.7.2-riscbsd/config.status    Sat Mar  2 05:07:30 1996
  175. ***************
  176. *** 0 ****
  177. --- 1,4 ----
  178. + #!/bin/sh
  179. + # GCC was configured as follows:
  180. + ./configure --verbose --with-gnu-ld --with-gnu-as --with-stabs --host=arm-riscpc-netbsd1.1A --target=arm-riscpc-netbsd1.1A
  181. + echo host=arm-riscpc-netbsd1.