summaryrefslogtreecommitdiffstats
path: root/gnu/gnu2bmake/gcc-2.6.1.patch
blob: fb17501992c094d804197517d117bf3dc3eadd6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# this patch is good for 2.6.1 and 2.6.2

diff -r -c ../../scratch/gcc-2.6.1/cccp.1 ./cccp.1
*** ../../scratch/gcc-2.6.1/cccp.1	Tue May 31 16:29:50 1994
--- ./cccp.1	Mon Nov 14 19:42:44 1994
***************
*** 1,13 ****
  .\" Copyright (c) 1991, 1992, 1993 Free Software Foundation       \-*-Text-*-
  .\" See section COPYING for conditions for redistribution
! .TH cpp 1 "30apr1993" "GNU Tools" "GNU Tools"
  .SH NAME
! cccp, cpp \- The GNU C-Compatible Compiler Preprocessor.
  .SH SYNOPSIS
  .hy 0
  .na
  .TP
! .B cccp
  .RB "[\|" \-$ "\|]"
  .RB "[\|" \-A \c
  .I predicate\c
--- 1,13 ----
  .\" Copyright (c) 1991, 1992, 1993 Free Software Foundation       \-*-Text-*-
  .\" See section COPYING for conditions for redistribution
! .TH cpp 1 "30, April 1993" "FreeBSD" "GNU Tools"
  .SH NAME
! cpp \- Compiler Preprocessor.
  .SH SYNOPSIS
  .hy 0
  .na
  .TP
! .B cpp
  .RB "[\|" \-$ "\|]"
  .RB "[\|" \-A \c
  .I predicate\c
***************
*** 142,154 ****
  Most often when you use the C preprocessor you will not have to invoke it
  explicitly: the C compiler will do so automatically.  However, the
  preprocessor is sometimes useful individually.
- 
- When you call the preprocessor individually, either name
- (\c
- .B cpp\c
- \& or \c
- .B cccp\c
- \&) will do\(em\&they are completely synonymous.
  
  The C preprocessor expects two file names as arguments, \c
  .I infile\c
--- 142,147 ----
Only in .: cccp.1.orig
diff -r -c ../../scratch/gcc-2.6.1/cccp.c ./cccp.c
*** ../../scratch/gcc-2.6.1/cccp.c	Tue Oct 25 15:37:44 1994
--- ./cccp.c	Mon Nov 14 19:40:30 1994
***************
*** 188,194 ****
  #ifndef VMS
  #ifndef HAVE_STRERROR
  extern int sys_nerr;
! #if defined(bsd4_4) || defined(__NetBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
--- 188,194 ----
  #ifndef VMS
  #ifndef HAVE_STRERROR
  extern int sys_nerr;
! #if defined(bsd4_4) || defined(__NetBSD__) || defined(__FreeBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
Only in .: cccp.c.orig
Only in .: cccp.c.rej
diff -r -c ../../scratch/gcc-2.6.1/config/i386/freebsd.h ./config/i386/freebsd.h
*** ../../scratch/gcc-2.6.1/config/i386/freebsd.h	Tue Oct 18 17:59:52 1994
--- ./config/i386/freebsd.h	Mon Nov 14 19:41:07 1994
***************
*** 19,27 ****
  along with GNU CC; see the file COPYING.  If not, write to
  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
- /* This goes away when the math-emulator is fixed */
- #define TARGET_CPU_DEFAULT 0400		/* TARGET_NO_FANCY_MATH_387 */
- 
  /* This is tested by i386gas.h.  */
  #define YES_UNDERSCORES
  
--- 19,24 ----
***************
*** 31,37 ****
  #include "i386/perform.h"
  
  #undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
  
  #define INCLUDE_DEFAULTS { \
  	{ "/usr/include", 0 }, \
--- 28,34 ----
  #include "i386/perform.h"
  
  #undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=2 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
  
  #define INCLUDE_DEFAULTS { \
  	{ "/usr/include", 0 }, \
***************
*** 39,47 ****
--- 36,54 ----
  	{ 0, 0} \
  	}
  
+ #define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
+ 
  /* Like the default, except no -lg.  */
  #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
  
+ #define LINK_SPEC \
+   "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*} \
+    %{p:-Bstatic} %{pg:-Bstatic} %{Z}"
+ 
+ /* This goes away when the math emulator is fixed.  */
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT	(MASK_NO_FANCY_MATH_387 | 0301)
+ 
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
  
***************
*** 49,80 ****
  #define PTRDIFF_TYPE "int"
  
  #undef WCHAR_TYPE
! #define WCHAR_TYPE "short unsigned int"
  
! #define WCHAR_UNSIGNED 1
  
  #undef WCHAR_TYPE_SIZE
! #define WCHAR_TYPE_SIZE 16
  
  #define HAVE_ATEXIT
  
! /* Redefine this to use %eax instead of %edx.  */
  #undef FUNCTION_PROFILER
  #define FUNCTION_PROFILER(FILE, LABELNO)  \
  {									\
    if (flag_pic)								\
!     {									\
!       fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n",		\
! 	       LPREFIX, (LABELNO));					\
!       fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");			\
!     }									\
    else									\
!     {									\
!       fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO));	\
!       fprintf (FILE, "\tcall mcount\n");				\
!     }									\
  }
  
  /* There are conflicting reports about whether this system uses
     a different assembler syntax.  wilson@cygnus.com says # is right.  */
  #undef COMMENT_BEGIN
--- 56,95 ----
  #define PTRDIFF_TYPE "int"
  
  #undef WCHAR_TYPE
! #define WCHAR_TYPE "int"
  
! #define WCHAR_UNSIGNED 0
  
  #undef WCHAR_TYPE_SIZE
! #define WCHAR_TYPE_SIZE BITS_PER_WORD
  
  #define HAVE_ATEXIT
  
! /* Tell final.c that we don't need a label passed to mcount.  */
! 
! #define NO_PROFILE_DATA
! 
! /* Redefine this to not pass an unused label in %edx.  */
! 
  #undef FUNCTION_PROFILER
  #define FUNCTION_PROFILER(FILE, LABELNO)  \
  {									\
    if (flag_pic)								\
!     fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");			\
    else									\
!     fprintf (FILE, "\tcall mcount\n");					\
  }
  
+ #if 0 /* not ready for this; it should be decided at compile time */
+ #define FUNCTION_PROFILER_EPILOGUE(FILE)  \
+ {									\
+   if (flag_pic)								\
+     fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n");			\
+   else									\
+     fprintf (FILE, "\tcall mexitcount\n");				\
+ }
+ #endif
+ 
  /* There are conflicting reports about whether this system uses
     a different assembler syntax.  wilson@cygnus.com says # is right.  */
  #undef COMMENT_BEGIN
***************
*** 218,227 ****
  	putc ('\n', FILE);						\
        }									\
    } while (0)
- 
- #define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
- #define LINK_SPEC \
-   "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}"
  
  /* This is defined when gcc is compiled in the BSD-directory-tree, and must
   * make up for the gap to all the stuff done in the GNU-makefiles.
--- 233,238 ----
Only in ./config/i386: freebsd.h.orig
diff -r -c ../../scratch/gcc-2.6.1/config/i386/i386.c ./config/i386/i386.c
*** ../../scratch/gcc-2.6.1/config/i386/i386.c	Fri Oct  7 12:45:14 1994
--- ./config/i386/i386.c	Mon Nov 14 19:41:27 1994
***************
*** 1097,1103 ****
    int limit;
    rtx xops[4];
    int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
! 				  || current_function_uses_const_pool);
  
    xops[0] = stack_pointer_rtx;
    xops[1] = frame_pointer_rtx;
--- 1097,1104 ----
    int limit;
    rtx xops[4];
    int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
! 				  || current_function_uses_const_pool
! 				  || profile_flag || profile_block_flag);
  
    xops[0] = stack_pointer_rtx;
    xops[1] = frame_pointer_rtx;
***************
*** 1158,1165 ****
    int nregs = 0;
    int reglimit = (frame_pointer_needed
  		  ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
!   int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
! 				  || current_function_uses_const_pool);
  
  #ifdef NON_SAVING_SETJMP
    if (NON_SAVING_SETJMP && current_function_calls_setjmp)
--- 1159,1174 ----
    int nregs = 0;
    int reglimit = (frame_pointer_needed
  		  ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
! 
! #ifdef FUNCTION_PROFILER_EPILOGUE
!   if (profile_flag)
!     return 0;
! #endif
! 
!   if (flag_pic && (current_function_uses_pic_offset_table
! 		   || current_function_uses_const_pool
! 		   || profile_flag || profile_block_flag))
!     return 0;
  
  #ifdef NON_SAVING_SETJMP
    if (NON_SAVING_SETJMP && current_function_calls_setjmp)
***************
*** 1170,1177 ****
      return 0;
  
    for (regno = reglimit - 1; regno >= 0; regno--)
!     if ((regs_ever_live[regno] && ! call_used_regs[regno])
! 	|| (regno == PIC_OFFSET_TABLE_REGNUM && pic_reg_used))
        nregs++;
  
    return nregs == 0 || ! frame_pointer_needed;
--- 1179,1185 ----
      return 0;
  
    for (regno = reglimit - 1; regno >= 0; regno--)
!     if (regs_ever_live[regno] && ! call_used_regs[regno])
        nregs++;
  
    return nregs == 0 || ! frame_pointer_needed;
***************
*** 1193,1198 ****
--- 1201,1211 ----
    rtx xops[3];
    int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
  				  || current_function_uses_const_pool);
+ 
+ #ifdef FUNCTION_PROFILER_EPILOGUE
+   if (profile_flag)
+     FUNCTION_PROFILER_EPILOGUE (file);
+ #endif
  
    /* Compute the number of registers to pop */
  
Only in ./config/i386: i386.c.orig
diff -r -c ../../scratch/gcc-2.6.1/cp/g++.c ./cp/g++.c
*** ../../scratch/gcc-2.6.1/cp/g++.c	Sat Oct 29 04:17:44 1994
--- ./cp/g++.c	Mon Nov 14 19:41:16 1994
***************
*** 84,90 ****
  #endif
  
  extern int sys_nerr;
! #if defined(bsd4_4) || defined(__NetBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
--- 84,90 ----
  #endif
  
  extern int sys_nerr;
! #if defined(bsd4_4) || defined(__NetBSD__) || defined(__FreeBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
Only in ./cp: g++.c.orig
Only in ../../scratch/gcc-2.6.1: cpp.1
Only in .: cpp.1.orig
Only in .: cpp.1.rej
Only in .: cpp.1.rej.orig
diff -r -c ../../scratch/gcc-2.6.1/final.c ./final.c
*** ../../scratch/gcc-2.6.1/final.c	Tue Sep 20 17:05:03 1994
--- ./final.c	Mon Nov 14 19:40:32 1994
***************
*** 957,970 ****
--- 957,974 ----
  profile_function (file)
       FILE *file;
  {
+ #ifndef NO_PROFILE_DATA
    int align = MIN (BIGGEST_ALIGNMENT, POINTER_SIZE);
+ #endif /* not NO_PROFILE_DATA */
    int sval = current_function_returns_struct;
    int cxt = current_function_needs_context;
  
+ #ifndef NO_PROFILE_DATA
    data_section ();
    ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
    ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no);
    assemble_integer (const0_rtx, POINTER_SIZE / BITS_PER_UNIT, 1);
+ #endif /* not NO_PROFILE_DATA */
  
    text_section ();
  
Only in .: final.c.orig
Only in .: final.c.rej
diff -r -c ../../scratch/gcc-2.6.1/gcc.c ./gcc.c
*** ../../scratch/gcc-2.6.1/gcc.c	Thu Oct 27 15:49:58 1994
--- ./gcc.c	Mon Nov 14 19:41:18 1994
***************
*** 166,172 ****
  #endif
  
  extern int sys_nerr;
! #if defined(bsd4_4) || defined(__NetBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
--- 166,172 ----
  #endif
  
  extern int sys_nerr;
! #if defined(bsd4_4) || defined(__NetBSD__) || defined (__FreeBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
***************
*** 711,716 ****
--- 711,745 ----
  		    %{!S:%{!gnatc:%{!gnats:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  					      %{c:%W{o*}%{!o*:-o %w%b.o}}\
  					      %{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n}}}}}} "},
+ /***** ljo's Fortran rule *****/
+   {".f", "@f2c"},
+   {"@f2c",
+    "f2c %{checksubscripts:-C} %{I2} %{onetrip} %{honorcase:-U} %{u} %{w}\
+         %{ANSIC:-A} %{a} %{C++}\
+         %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr}\
+         %{P} %{p} %{r} %{r8} %{s} %{w8} %{z} %{N*}\
+         %i %{!pipe: -o %g.c} %{pipe:-o -}|\n",
+    "cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
+ 	%{C:%{!E:%eGNU C does not support -C without using -E}}\
+ 	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
+         -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+ 	%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
+ 	%{!undef:%{!ansi:%p} %P} %{trigraphs} \
+         %c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\
+         %{traditional-cpp:-traditional}\
+ 	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
+         %{pipe:-} %{!pipe:%g.c} %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
+    "%{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \
+ 		   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a}\
+ 		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
+ 		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
+ 		   %{aux-info*}\
+ 		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
+ 		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
+               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
+ 		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+                       %{!pipe:%g.s} %A\n }}}}"},
+ /***** End of ljo's Fortran rule *****/
    /* Mark end of table */
    {0, 0}
  };
Only in .: gcc.c.orig
OpenPOWER on IntegriCloud