1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00
freebsd/gnu/gnu2bmake/gcc-2.6.1.patch
Poul-Henning Kamp 8ab1d79d16 Integrated GCC-2.6.1 -> GCC-2.6.2 changes.
Notice that the libgcc DOESN'T change number, because there are no
changes.

Also now the gnu2bmake stuff is synchronized again.

I commit this so that others can test too.

You might want to postpone any "make worlds" until tomorrow, to
avoid any problems I didn't see in the first pass.

Thanks to Bruce for rounding up our changes to gcc.
1994-11-15 04:52:19 +00:00

408 lines
12 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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