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.
This commit is contained in:
phk 1994-11-15 04:52:19 +00:00
parent 1b3b9563be
commit 96e31776cc
28 changed files with 609 additions and 325 deletions

View File

@ -1,178 +1,407 @@
diff -u -r /freebsd/gcc-2.6.1/cccp.c ./cccp.c
--- /freebsd/gcc-2.6.1/cccp.c Tue Oct 25 15:37:44 1994
+++ ./cccp.c Wed Nov 2 17:36:25 1994
@@ -188,7 +188,7 @@
#ifndef VMS
#ifndef HAVE_STRERROR
extern int sys_nerr;
-#if defined(bsd4_4) || defined(__NetBSD__)
+#if defined(bsd4_4) || defined(__NetBSD__) || defined(__FreeBSD__)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
# 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.o
Only in .: cexp.o
diff -u -r /freebsd/gcc-2.6.1/collect2.c ./collect2.c
--- /freebsd/gcc-2.6.1/collect2.c Thu Oct 20 15:05:46 1994
+++ ./collect2.c Wed Nov 2 17:36:25 1994
@@ -41,7 +41,7 @@
extern int errno;
#endif
-#if defined(bsd4_4) || defined(__NetBSD__)
+#if defined(bsd4_4) || defined(__NetBSD__) || defined(__FreeBSD__)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
Only in .: collect2.c.orig
diff -u -r /freebsd/gcc-2.6.1/config/i386/freebsd.h ./config/i386/freebsd.h
--- /freebsd/gcc-2.6.1/config/i386/freebsd.h Tue Oct 18 17:59:52 1994
+++ ./config/i386/freebsd.h Wed Nov 2 17:36:37 1994
@@ -33,11 +33,13 @@
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+#if 0
#define INCLUDE_DEFAULTS { \
{ "/usr/include", 0 }, \
{ "/usr/include/g++", 1 }, \
{ 0, 0} \
}
+#endif
/* Like the default, except no -lg. */
#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
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 -u -r /freebsd/gcc-2.6.1/config/i386/x-freebsd ./config/i386/x-freebsd
--- /freebsd/gcc-2.6.1/config/i386/x-freebsd Mon Oct 31 04:52:41 1994
+++ ./config/i386/x-freebsd Wed Nov 2 18:45:36 1994
@@ -1,3 +1,6 @@
# Don't run fixproto
STMP_FIXPROTO =
-CLIB=-lgnumalloc
+CLIB = -lgnumalloc
+
+# Find FreeBSD's includes before resorting to GCC's
+LIBGCC2_INCLUDES -I/usr/include
Only in .: config.h
Only in .: config.status
Only in ./cp: Makefile
diff -u -r /freebsd/gcc-2.6.1/cp/g++.c ./cp/g++.c
--- /freebsd/gcc-2.6.1/cp/g++.c Sat Oct 29 04:17:44 1994
+++ ./cp/g++.c Wed Nov 2 17:36:42 1994
@@ -84,7 +84,7 @@
#endif
extern int sys_nerr;
-#if defined(bsd4_4) || defined(__NetBSD__)
+#if defined(bsd4_4) || defined(__NetBSD__) || defined(__FreeBSD__)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
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 ./cp: include
Only in ./cp: stage1
Only in ./cp: stage2
Only in ./cp: stage3
Only in ./cp: stage4
Only in .: cpp
Only in .: float.h-nat
diff -u -r /freebsd/gcc-2.6.1/gcc.c ./gcc.c
--- /freebsd/gcc-2.6.1/gcc.c Thu Oct 27 15:49:58 1994
+++ ./gcc.c Wed Nov 2 17:36:43 1994
@@ -166,7 +166,7 @@
#endif
extern int sys_nerr;
-#if defined(bsd4_4) || defined(__NetBSD__)
+#if defined(bsd4_4) || defined(__NetBSD__) || defined (__FreeBSD__)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
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
Only in .: gfloat.h
diff -u -r /freebsd/gcc-2.6.1/ginclude/stdarg.h ./ginclude/stdarg.h
--- /freebsd/gcc-2.6.1/ginclude/stdarg.h Fri Jul 8 19:04:27 1994
+++ ./ginclude/stdarg.h Wed Nov 2 17:36:49 1994
@@ -136,13 +136,13 @@
But on BSD NET2 we must not test or define or undef it.
(Note that the comments in NET 2's ansi.h
are incorrect for _VA_LIST_--see stdio.h!) */
-#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__) || defined (__FreeBSD__)
+#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__)
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
#ifndef _VA_LIST_T_H
#define _VA_LIST_T_H
-#if !(defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__) || defined (__FreeBSD__))
+#if !(defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__)
#define _VA_LIST_
#endif
#define _VA_LIST
Only in ./ginclude: stdarg.h.orig
diff -u -r /freebsd/gcc-2.6.1/ginclude/stddef.h ./ginclude/stddef.h
--- /freebsd/gcc-2.6.1/ginclude/stddef.h Fri Oct 7 16:22:35 1994
+++ ./ginclude/stddef.h Wed Nov 2 17:36:54 1994
@@ -22,7 +22,7 @@
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
-#if defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__FreeBSD__)
+#if defined (__BSD_NET2__) || defined (____FreeBSD____)
#include <machine/ansi.h>
#endif
Only in ./ginclude: stddef.h.orig
diff -u -r /freebsd/gcc-2.6.1/ginclude/varargs.h ./ginclude/varargs.h
--- /freebsd/gcc-2.6.1/ginclude/varargs.h Fri Jul 8 19:04:32 1994
+++ ./ginclude/varargs.h Wed Nov 2 17:36:59 1994
@@ -151,13 +151,13 @@
/* Michael Eriksson <mer@sics.se> at Thu Sep 30 11:00:57 1993:
Sequent defines _VA_LIST_ in <machine/machtypes.h> to be the type to
use for va_list (``typedef _VA_LIST_ va_list'') */
-#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)
+#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__) || defined (__sequent__)
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
#ifndef _VA_LIST_T_H
#define _VA_LIST_T_H
-#if !(defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
+#if !(defined (__BSD_NET2__) || defined (____FreeBSD____) || defined (__bsdi__) || defined (__sequent__)
#define _VA_LIST_
#endif
#define _VA_LIST
Only in ./ginclude: varargs.h.orig
Only in .: hconfig.h
Only in .: include
Only in .: libgcc.a
Only in .: libgcc1.a
Only in .: libgcc2.a
Only in .: libgcc2.ready
Only in .: md
Only in .: multilib.h
Only in .: objc-headers
Only in .: obstack.o
diff -u -r /freebsd/gcc-2.6.1/protoize.c ./protoize.c
--- /freebsd/gcc-2.6.1/protoize.c Tue Oct 4 20:17:40 1994
+++ ./protoize.c Wed Nov 2 17:37:00 1994
@@ -79,7 +79,7 @@
#undef getopt
extern int errno;
-#if defined(bsd4_4) || defined(__NetBSD__)
+#if defined(bsd4_4) || defined(__NetBSD__) || defined (__FreeBSD__)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
Only in .: protoize.c.orig
Only in .: stage1
Only in .: stmp-fixinc
Only in .: stmp-headers
Only in .: stmp-int-hdrs
Only in .: tconfig.h
Only in .: tm.h
Only in .: version.o
Only in .: xlimits.h

View File

@ -7,16 +7,17 @@
# this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
# ----------------------------------------------------------------------------
#
# $FreeBSD$
# $Id$
#
# Good for 2.6.1 and 2.6.2
source gnu2bmake.tcl
#######################################################################
# Parameters to tweak
########
set sdir /freebsd/A/gcc-2.6.1
set ddir /freebsd/A/cc261
set sdir /freebsd/gcc-2.6.2
set ddir /freebsd/cc262
#######################################################################
# Do the stunt
@ -94,21 +95,37 @@ set target [makefile_macro target $sdir]
sh "rm -rf $ddir"
sh "mkdir $ddir"
set f [open $ddir/Makefile.inc w]
puts $f "#\n# \$FreeBSD\$\n#\n"
puts $f "#\n# \$Id\$\n#\n"
puts $f "CFLAGS+=\t-I\${.CURDIR} -I\${.CURDIR}/../include"
puts $f "CFLAGS+=\t-Dbsd4_4"
puts $f "CFLAGS+=\t-DGCC_INCLUDE_DIR=\\\"FOO\\\""
puts $f "CFLAGS+=\t-DGPLUSPLUS_INCLUDE_DIR=\\\"FOO\\\""
puts $f "CFLAGS+=\t-DTOOL_INCLUDE_DIR=\\\"FOO\\\""
puts $f "CFLAGS+=\t-DGPLUSPLUS_INCLUDE_DIR=\\\"FOO\\\""
puts $f "CFLAGS+=\t-DDEFAULT_TARGET_VERSION=\\\"$version\\\""
puts $f "CFLAGS+=\t-DDEFAULT_TARGET_MACHINE=\\\"$target\\\""
puts $f "CFLAGS+=\t-DMD_EXEC_PREFIX=\\\"/usr/libexec/\\\""
puts $f "CFLAGS+=\t-DSTANDARD_STARTFILE_PREFIX=\\\"/usr/lib\\\""
puts $f "CFLAGS+=\t-DGCC_NAME=\\\"cc\\\""
puts $f ""
puts $f ".if exists(\${.CURDIR}/../cc_int/obj)"
puts $f "LIBDESTDIR=\t\${.CURDIR}/../cc_int/obj"
puts $f ".else"
puts $f "LIBDESTDIR=\t\${.CURDIR}/../cc_int"
puts $f ".endif"
puts $f ""
puts $f "# XXX LDDESTDIR isn't a directory and there is no standard name for the dir"
puts $f "LDDESTDIR=\t-L\${LIBDESTDIR}"
puts $f ".if defined(SHARED_LIBCC_INT)"
puts $f "LIBCC_INT=\t\${LIBDESTDIR}/libcc_int.so.262.0"
puts $f ".else"
puts $f "LIBCC_INT=\t\${LIBDESTDIR}/libcc_int.a"
puts $f ".endif"
close $f
set f [open $ddir/Makefile w]
puts $f "#\n# \$FreeBSD\$\n#\n"
puts $f "PGMDIR=\tcc_int cpp cc1 cc cc1plus c++ libgcc"
puts $f "#\n# \$Id\$\n#\n"
puts $f "PGMDIR=\tcc_int cpp cc1 cc cc1plus c++ f77 libgcc"
puts $f "SUBDIR=\t\$(PGMDIR)"
puts $f "\n.include <bsd.subdir.mk>"
close $f
@ -118,7 +135,7 @@ sh "mkdir $ddir/legal"
sh "cp $sdir/gen-*.c $sdir/md $ddir/legal"
set f [open $ddir/README w]
puts $f {
$FreeBSD$
$Id$
This directory contains gcc in a form that uses "bmake" makefiles.
This is not the place you want to start, if you want to hack gcc.
@ -137,11 +154,11 @@ Thankyou.
# do ~/libgcc
sh "mkdir $ddir/libgcc"
set f [open $ddir/libgcc/Makefile w]
puts $f "#\n# \$FreeBSD\$\n#\n"
puts $f "#\n# \$Id\$\n#\n"
puts $f "LIB=\tgcc"
puts $f "INSTALL_PIC_ARCHIVE=\tyes"
puts $f "SHLIB_MAJOR=\t26"
puts $f "SHLIB_MINOR=\t1"
puts $f "SHLIB_MAJOR=\t261"
puts $f "SHLIB_MINOR=\t0"
puts $f ""
puts $f "LIB1OBJS=\t[add_suffix $l_libgcc1 .o]"
puts $f "LIB2OBJS=\t[add_suffix $l_libgcc2 .o]"
@ -195,28 +212,31 @@ copy_l $sdir/config/i386 $ddir/include/i386 [add_suffix $l_include_i386 .h]
# do ~/cc_int
mk_lib $ddir cc_int [add_suffix $l_common .c] {
"NOPROFILE=\t1"
"NOPROFILE=\tyes"
".if defined(SHARED_LIBCC_INT)"
"INTERNALLIB="
"SHLIB_MAJOR=262"
"SHLIB_MINOR=0"
".else"
"\ninstall:\n\t@true"
".endif"
}
copy_c $sdir $ddir/cc_int $l_common
# do ~/cpp
mk_prog $ddir cpp [add_suffix $l_cpp .c] {
"BINDIR=\t/usr/libexec"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int/obj"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int"
"LDADD+=\t-lcc_int"
".PATH:\t\${.CURDIR}/../cc_int"
"SRCS+=\tobstack.c version.c"
}
copy_c $sdir $ddir/cpp $l_cpp
cp $sdir/cpp.1 $ddir/cpp/cpp.1
cp $sdir/cccp.1 $ddir/cpp/cpp.1
# do ~/c++
mk_prog $ddir c++ [add_suffix "$l_cplus $l_cplus_cp" .c] {
"BINDIR=\t/usr/bin"
"LINKS=\t\${BINDIR}/c++ \${BINDIR}/g++"
"NOMAN=\t1"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int/obj"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int"
"LDADD+=\t-lcc_int"
}
copy_c $sdir $ddir/c++ $l_cplus
copy_c $sdir/cp $ddir/c++ $l_cplus_cp
@ -224,13 +244,9 @@ copy_c $sdir/cp $ddir/c++ $l_cplus_cp
# do ~/cc
mk_prog $ddir cc [add_suffix $l_cc .c] {
"BINDIR=\t/usr/bin"
"MLINKS+=cc.1 gcc.1"
"MLINKS+=cc.1 c++.1"
"MLINKS+=cc.1 g++.1"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int/obj"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int"
"LDADD+=\t-lcc_int"
"\nafterinstall:\n\tcd \$(DESTDIR)\$(BINDIR) ; rm gcc ; ln -s cc gcc"
".PATH: \${.CURDIR}/../cc_int"
"SRCS+=\tobstack.c version.c"
"LINKS=\t\${BINDIR}/cc \${BINDIR}/gcc"
}
copy_c $sdir $ddir/cc $l_cc
cp $sdir/gcc.1 $ddir/cc/cc.1
@ -239,9 +255,8 @@ cp $sdir/gcc.1 $ddir/cc/cc.1
mk_prog $ddir cc1 [add_suffix $l_cc1 .c] {
"BINDIR=\t/usr/libexec"
"NOMAN=\t1"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int/obj"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int"
"LDADD+=\t-lcc_int"
"DPADD+=\t\${LIBCC_INT} \${LIBGNUMALLOC}"
"LDADD+=\t-lcc_int -lgnumalloc"
}
copy_c $sdir $ddir/cc1 $l_cc1
@ -249,9 +264,8 @@ copy_c $sdir $ddir/cc1 $l_cc1
mk_prog $ddir cc1plus [add_suffix "$l_cc1plus_cp $l_cc1plus" .c] {
"BINDIR=\t/usr/libexec"
"NOMAN=\t1"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int/obj"
"LDDESTDIR+=\t-L\${.CURDIR}/../cc_int"
"LDADD+=\t-lcc_int"
"DPADD+=\t\${LIBCC_INT} \${LIBGNUMALLOC}"
"LDADD+=\t-lcc_int -lgnumalloc"
}
copy_l $sdir/cp $ddir/cc1plus $l_cc1plus_x
copy_c $sdir $ddir/cc1plus $l_cc1plus

View File

@ -7,7 +7,7 @@
# this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
# ----------------------------------------------------------------------------
#
# $FreeBSD$
# $Id$
#
#######################################################################
# Generic procedures usable in the process of gnu-to-bmake jobs.
@ -166,7 +166,7 @@ proc makefile_macro {macro dir {makefile Makefile}} {
proc mk_prog {ddir name list {make ""}} {
sh "mkdir $ddir/$name"
set f [open $ddir/$name/Makefile w]
puts $f "#\n# \$FreeBSD\$\n#\n"
puts $f "#\n# \$Id\$\n#\n"
puts $f "PROG =\t$name"
puts $f "SRCS =\t[lsort $list]"
foreach i $make {puts $f $i}
@ -184,7 +184,7 @@ proc mk_prog {ddir name list {make ""}} {
proc mk_lib {ddir name list {make ""}} {
sh "mkdir $ddir/$name"
set f [open $ddir/$name/Makefile w]
puts $f "#\n# \$FreeBSD\$\n#\n"
puts $f "#\n# \$Id\$\n#\n"
puts $f "SRCS =\t[lsort $list]"
puts $f "LIB =\t$name"
foreach i $make {puts $f $i}

View File

@ -1,5 +1,5 @@
#
# $FreeBSD$
# $Id$
#
LIB= gcc

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile,v 1.2 1994/09/18 22:35:35 wollman Exp $
# $Id$
#
PGMDIR= cc_int cpp cc1 cc cc1plus c++ f77 libgcc

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile.inc,v 1.8 1994/11/03 20:37:05 phk Exp $
# $Id$
#
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../include
@ -7,7 +7,7 @@ CFLAGS+= -Dbsd4_4
CFLAGS+= -DGCC_INCLUDE_DIR=\"FOO\"
CFLAGS+= -DTOOL_INCLUDE_DIR=\"FOO\"
CFLAGS+= -DGPLUSPLUS_INCLUDE_DIR=\"FOO\"
CFLAGS+= -DDEFAULT_TARGET_VERSION=\"2.6.1\"
CFLAGS+= -DDEFAULT_TARGET_VERSION=\"2.6.2\"
CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"i386--freebsd\"
CFLAGS+= -DMD_EXEC_PREFIX=\"/usr/libexec/\"
CFLAGS+= -DSTANDARD_STARTFILE_PREFIX=\"/usr/lib\"
@ -22,7 +22,7 @@ LIBDESTDIR= ${.CURDIR}/../cc_int
# XXX LDDESTDIR isn't a directory and there is no standard name for the dir
LDDESTDIR= -L${LIBDESTDIR}
.if defined(SHARED_LIBCC_INT)
LIBCC_INT= ${LIBDESTDIR}/libcc_int.so.261.0
LIBCC_INT= ${LIBDESTDIR}/libcc_int.so.262.0
.else
LIBCC_INT= ${LIBDESTDIR}/libcc_int.a
.endif

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile,v 1.3 1994/09/18 22:35:43 wollman Exp $
# $Id$
#
PROG = c++

View File

@ -1,12 +1,12 @@
#
# $Id: Makefile,v 1.5 1994/09/18 22:35:46 wollman Exp $
# $Id$
#
.PATH: ${.CURDIR}/../cc_int
PROG = cc
SRCS = gcc.c obstack.c version.c
SRCS = gcc.c
BINDIR= /usr/bin
LINKS= ${BINDIR}/cc ${BINDIR}/gcc
.PATH: ${.CURDIR}/../cc_int
SRCS+= obstack.c version.c
LINKS= ${BINDIR}/cc ${BINDIR}/gcc
.include <bsd.prog.mk>

View File

@ -2438,7 +2438,7 @@ process_command (argc, argv)
}
temp = getenv ("LIBRARY_PATH");
if (temp)
if (temp && ! cross_compile)
{
char *startp, *endp;
char *nstore = (char *) alloca (strlen (temp) + 3);
@ -2470,7 +2470,7 @@ process_command (argc, argv)
/* Use LPATH like LIBRARY_PATH (for the CMU build program). */
temp = getenv ("LPATH");
if (temp)
if (temp && ! cross_compile)
{
char *startp, *endp;
char *nstore = (char *) alloca (strlen (temp) + 3);

View File

@ -1698,11 +1698,16 @@ duplicate_decls (newdecl, olddecl)
make_var_volatile (newdecl);
}
/* Keep source location of definition rather than declaration. */
if (DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0)
/* Keep source location of definition rather than declaration.
Likewise, keep decl at outer scope. */
if ((DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0)
|| (DECL_CONTEXT (newdecl) != 0 && DECL_CONTEXT (olddecl) == 0))
{
DECL_SOURCE_LINE (newdecl) = DECL_SOURCE_LINE (olddecl);
DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl);
if (DECL_CONTEXT (olddecl) == 0)
DECL_CONTEXT (newdecl) = 0;
}
/* Merge the unused-warning information. */

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile,v 1.5 1994/10/25 07:02:23 davidg Exp $
# $Id$
#
SRCS = aux-output.c bc-emit.c bc-optab.c c-common.c caller-save.c calls.c combine.c convert.c cse.c dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.c final.c flow.c fold-const.c function.c getpwd.c global.c insn-attrtab.c insn-emit.c insn-extract.c insn-opinit.c insn-output.c insn-peep.c insn-recog.c integrate.c jump.c local-alloc.c loop.c obstack.c optabs.c print-rtl.c print-tree.c real.c recog.c reg-stack.c regclass.c reload.c reload1.c reorg.c rtl.c rtlanal.c sched.c sdbout.c stmt.c stor-layout.c stupid.c toplev.c tree.c unroll.c varasm.c version.c xcoffout.c
@ -7,7 +7,7 @@ LIB = cc_int
NOPROFILE= yes
.if defined(SHARED_LIBCC_INT)
INTERNALLIB=
SHLIB_MAJOR=261
SHLIB_MAJOR=262
SHLIB_MINOR=0
.else

View File

@ -2819,7 +2819,7 @@ save_386_machine_status (p)
struct function *p;
{
p->machine = (struct machine_function *) xmalloc (sizeof i386_stack_locals);
bcopy (i386_stack_locals, p->machine->i386_stack_locals,
bcopy ((char *) i386_stack_locals, (char *) p->machine->i386_stack_locals,
sizeof i386_stack_locals);
}
@ -2827,7 +2827,7 @@ void
restore_386_machine_status (p)
struct function *p;
{
bcopy (p->machine->i386_stack_locals, i386_stack_locals,
bcopy ((char *) p->machine->i386_stack_locals, (char *) i386_stack_locals,
sizeof i386_stack_locals);
free (p->machine);
}

View File

@ -867,7 +867,7 @@ bc_emit_bytecode (bytecode)
char byte;
static int prev_lineno = -1;
byte = bytecode;
byte = (char) bytecode;
#ifdef BCDEBUG_PRINT_CODE
if (lineno != prev_lineno)

View File

@ -215,7 +215,8 @@ decl_attributes (decl, attributes)
for (a = attributes; a; a = TREE_CHAIN (a))
if (!(name = TREE_VALUE (a)))
continue;
else if (name == get_identifier ("packed"))
else if (name == get_identifier ("packed")
|| name == get_identifier ("__packed__"))
{
if (TREE_CODE (decl) == FIELD_DECL)
DECL_PACKED (decl) = 1;
@ -226,7 +227,9 @@ decl_attributes (decl, attributes)
}
else if (TREE_VALUE (a) == get_identifier ("noreturn")
|| TREE_VALUE (a) == get_identifier ("volatile"))
|| TREE_VALUE (a) == get_identifier ("__noreturn__")
|| TREE_VALUE (a) == get_identifier ("volatile")
|| TREE_VALUE (a) == get_identifier ("__volatile__"))
{
if (TREE_CODE (decl) == FUNCTION_DECL)
TREE_THIS_VOLATILE (decl) = 1;
@ -240,7 +243,8 @@ decl_attributes (decl, attributes)
warning_with_decl (decl, "`%s' attribute ignored",
IDENTIFIER_POINTER (TREE_VALUE (a)));
}
else if (TREE_VALUE (a) == get_identifier ("const"))
else if (TREE_VALUE (a) == get_identifier ("const")
|| TREE_VALUE (a) == get_identifier ("__const__"))
{
if (TREE_CODE (decl) == FUNCTION_DECL)
TREE_READONLY (decl) = 1;
@ -253,7 +257,8 @@ decl_attributes (decl, attributes)
else
warning_with_decl (decl, "`const' attribute ignored");
}
else if (TREE_VALUE (a) == get_identifier ("transparent_union"))
else if (TREE_VALUE (a) == get_identifier ("transparent_union")
|| TREE_VALUE (a) == get_identifier ("__transparent_union__"))
{
if (TREE_CODE (decl) == PARM_DECL
&& TREE_CODE (type) == UNION_TYPE
@ -286,7 +291,8 @@ found_attr:;
IDENTIFIER_POINTER (name));
}
else if ( args = TREE_CHAIN(name),
!strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode")
(!strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode")
|| !strcmp (IDENTIFIER_POINTER (name), "__mode__"))
&& list_length (args) == 1
&& TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE)
{
@ -313,7 +319,8 @@ found_attr:;
if (i == NUM_MACHINE_MODES)
error_with_decl (decl, "unknown machine mode `%s'", specified_name);
}
else if (!strcmp (IDENTIFIER_POINTER (name), "section")
else if ((!strcmp (IDENTIFIER_POINTER (name), "section")
|| !strcmp (IDENTIFIER_POINTER (name), "__section__"))
&& list_length (args) == 1
&& TREE_CODE (TREE_VALUE (args)) == STRING_CST)
{
@ -340,7 +347,8 @@ found_attr:;
error_with_decl (decl, "section attributes are not supported for this target");
#endif
}
else if (!strcmp (IDENTIFIER_POINTER (name), "aligned")
else if ((!strcmp (IDENTIFIER_POINTER (name), "aligned")
|| !strcmp (IDENTIFIER_POINTER (name), "__aligned__"))
&& list_length (args) == 1
&& TREE_CODE (TREE_VALUE (args)) == INTEGER_CST)
{
@ -372,7 +380,8 @@ found_attr:;
else
DECL_ALIGN (decl) = align;
}
else if (!strcmp (IDENTIFIER_POINTER (name), "format")
else if ((!strcmp (IDENTIFIER_POINTER (name), "format")
|| !strcmp (IDENTIFIER_POINTER (name), "__format__"))
&& list_length (args) == 3
&& TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE
&& TREE_CODE (TREE_VALUE (TREE_CHAIN (args))) == INTEGER_CST
@ -394,9 +403,11 @@ found_attr:;
continue;
}
if (!strcmp (IDENTIFIER_POINTER (format_type), "printf"))
if (!strcmp (IDENTIFIER_POINTER (format_type), "printf")
|| !strcmp (IDENTIFIER_POINTER (format_type), "__printf__"))
is_scan = 0;
else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf"))
else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf")
|| !strcmp (IDENTIFIER_POINTER (format_type), "__scanf__"))
is_scan = 1;
else
{
@ -508,7 +519,7 @@ typedef struct {
/* Type of argument if length modifier `l' is used.
If NULL, then this modifier is not allowed. */
tree *llen;
/* Type of argument if length modifier `q' is used.
/* Type of argument if length modifier `q' or `ll' is used.
If NULL, then this modifier is not allowed. */
tree *qlen;
/* Type of argument if length modifier `L' is used.
@ -519,8 +530,8 @@ typedef struct {
} format_char_info;
static format_char_info print_char_table[] = {
{ "di", 0, T_I, T_I, T_L, T_LL, NULL, "-wp0 +" },
{ "oxX", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0#" },
{ "di", 0, T_I, T_I, T_L, T_LL, T_LL, "-wp0 +" },
{ "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0#" },
{ "u", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0" },
/* Two GNU extensions. */
{ "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" },
@ -536,8 +547,8 @@ static format_char_info print_char_table[] = {
};
static format_char_info scan_char_table[] = {
{ "di", 1, T_I, T_S, T_L, T_LL, NULL, "*" },
{ "ouxX", 1, T_UI, T_US, T_UL, T_ULL, NULL, "*" },
{ "di", 1, T_I, T_S, T_L, T_LL, T_LL, "*" },
{ "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, "*" },
{ "efgEG", 1, T_F, NULL, T_D, NULL, T_LD, "*" },
{ "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" },
{ "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" },
@ -895,6 +906,8 @@ check_format_info (info, params)
length_char = *format_chars++;
else
length_char = 0;
if (length_char == 'l' && *format_chars == 'l')
length_char = 'q', format_chars++;
aflag = 0;
if (*format_chars == 'a')
{

View File

@ -3065,7 +3065,10 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
but PCC has one, so this will avoid some problems. */
emit_queue ();
/* Free any temporary slots made in processing this argument. */
/* Free any temporary slots made in processing this argument. Show
that we might have taken the address of something and pushed that
as an operand. */
preserve_temp_slots (NULL_RTX);
free_temp_slots ();
pop_temp_slots ();

View File

@ -1835,8 +1835,13 @@ try_combine (i3, i2, i1)
if (split_code == MULT
&& GET_CODE (XEXP (*split, 1)) == CONST_INT
&& (i = exact_log2 (INTVAL (XEXP (*split, 1)))) >= 0)
SUBST (*split, gen_rtx_combine (ASHIFT, split_mode,
XEXP (*split, 0), GEN_INT (i)));
{
SUBST (*split, gen_rtx_combine (ASHIFT, split_mode,
XEXP (*split, 0), GEN_INT (i)));
/* Update split_code because we may not have a multiply
anymore. */
split_code = GET_CODE (*split);
}
#ifdef INSN_SCHEDULING
/* If *SPLIT is a paradoxical SUBREG, when we split it, it should

View File

@ -2740,7 +2740,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
case TRUNC_DIV_EXPR:
if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size)
{
if (unsignedp)
if (unsignedp
|| (INTVAL (op1)
== (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (compute_mode) - 1)))
{
unsigned HOST_WIDE_INT mh, ml;
int pre_shift, post_shift;
@ -2901,6 +2903,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
tquotient, 0);
}
/* We have computed OP0 / abs(OP1). If OP1 is negative, negate
the quotient. */
if (d < 0)
{
insn = get_last_insn ();

View File

@ -839,6 +839,7 @@ assign_stack_temp (mode, size, keep)
plus_constant (XEXP (best_p->slot, 0),
rounded_size));
p->address = 0;
p->rtl_expr = 0;
p->next = temp_slots;
temp_slots = p;
@ -1098,14 +1099,14 @@ preserve_rtl_expr_result (x)
if (x == 0 || GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0)))
return;
/* If we can find a match, move it to our level. */
for (p = temp_slots; p; p = p->next)
if (p->in_use && rtx_equal_p (x, p->slot))
{
p->level = temp_slot_level;
p->rtl_expr = 0;
return;
}
/* If we can find a match, move it to our level unless it is already at
an upper level. */
p = find_temp_slot_from_address (XEXP (x, 0));
if (p != 0)
{
p->level = MIN (p->level, temp_slot_level);
p->rtl_expr = 0;
}
return;
}

View File

@ -246,15 +246,15 @@ unknown arithmetic type
#define NE 6
#define MAXDECEXP 4932
#define MINDECEXP -4956
#define GET_REAL(r,e) bcopy (r, e, 2*NE)
#define PUT_REAL(e,r) bcopy (e, r, 2*NE)
#define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE)
#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE)
#else /* no XFmode */
#if LONG_DOUBLE_TYPE_SIZE == 128
#define NE 10
#define MAXDECEXP 4932
#define MINDECEXP -4977
#define GET_REAL(r,e) bcopy (r, e, 2*NE)
#define PUT_REAL(e,r) bcopy (e, r, 2*NE)
#define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE)
#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE)
#else
#define NE 6
#define MAXDECEXP 4932

View File

@ -225,9 +225,8 @@ static rtx FP_mode_reg[FIRST_PSEUDO_REGISTER][(int) MAX_MACHINE_MODE];
definition are validity of this information. */
#define BLOCK_NUM(INSN) \
(((INSN_UID (INSN) > max_uid) \
? (int *)(abort() , 0) \
: block_number)[INSN_UID (INSN)])
((INSN_UID (INSN) > max_uid) \
? (abort() , -1) : block_number[INSN_UID (INSN)])
extern rtx forced_labels;
extern rtx gen_jump ();
@ -368,8 +367,8 @@ reg_to_stack (first, file)
block_stack_in = (stack) alloca (blocks * sizeof (struct stack_def));
block_out_reg_set = (HARD_REG_SET *) alloca (blocks * sizeof (HARD_REG_SET));
bzero (block_stack_in, blocks * sizeof (struct stack_def));
bzero (block_out_reg_set, blocks * sizeof (HARD_REG_SET));
bzero ((char *) block_stack_in, blocks * sizeof (struct stack_def));
bzero ((char *) block_out_reg_set, blocks * sizeof (HARD_REG_SET));
block_number = (int *) alloca ((max_uid + 1) * sizeof (int));
@ -819,7 +818,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
Also enforce rule #5: Output operands must start at the top of
the reg-stack: output operands may not "skip" a reg. */
bzero (reg_used_as_output, sizeof (reg_used_as_output));
bzero ((char *) reg_used_as_output, sizeof (reg_used_as_output));
for (i = 0; i < n_outputs; i++)
if (STACK_REG_P (operands[i]))
if (reg_class_size[(int) operand_class[i]] != 1)
@ -852,7 +851,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
to the top of the reg-stack than any input that is not implicitly
popped. */
bzero (implicitly_dies, sizeof (implicitly_dies));
bzero ((char *) implicitly_dies, sizeof (implicitly_dies));
for (i = first_input; i < first_input + n_inputs; i++)
if (STACK_REG_P (operands[i]))
{
@ -1216,7 +1215,7 @@ find_blocks (first)
label_value_list);
}
BLOCK_NUM (insn) = block;
block_number[INSN_UID (insn)] = block;
if (code != NOTE)
prev_code = code;
@ -2342,7 +2341,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
}
}
bcopy (regstack, &temp_stack, sizeof (temp_stack));
bcopy ((char *) regstack, (char *) &temp_stack, sizeof (temp_stack));
/* Put the input regs into the desired place in TEMP_STACK. */

View File

@ -1329,10 +1329,10 @@ reload (first, global, dumpfile)
need only in the smallest class in which it
is required. */
bcopy (insn_needs.other.regs[0], basic_needs,
sizeof basic_needs);
bcopy (insn_needs.other.groups, basic_groups,
sizeof basic_groups);
bcopy ((char *) insn_needs.other.regs[0],
(char *) basic_needs, sizeof basic_needs);
bcopy ((char *) insn_needs.other.groups,
(char *) basic_groups, sizeof basic_groups);
for (i = 0; i < N_REG_CLASSES; i++)
{

View File

@ -1 +1 @@
char *version_string = "2.6.1";
char *version_string = "2.6.2";

View File

@ -2,9 +2,10 @@
# $Id$
#
.PATH: ${.CURDIR}/../cc_int
PROG = cpp
SRCS = cccp.c cexp.c obstack.c version.c
SRCS = cccp.c cexp.c
BINDIR= /usr/libexec
.PATH: ${.CURDIR}/../cc_int
SRCS+= obstack.c version.c
.include <bsd.prog.mk>

View File

@ -2,9 +2,10 @@
# $Id$
#
.PATH: ${.CURDIR}/../cc_int
PROG = cpp
SRCS = cccp.c cexp.c obstack.c version.c
SRCS = cccp.c cexp.c
BINDIR= /usr/libexec
.PATH: ${.CURDIR}/../cc_int
SRCS+= obstack.c version.c
.include <bsd.prog.mk>

View File

@ -604,14 +604,14 @@ static struct default_include {
automatically in Makefile.in. */
{ CROSS_INCLUDE_DIR, 0, 0 },
/* This is another place that the target system's headers might be. */
{ TOOL_INCLUDE_DIR, 0, 1 },
{ TOOL_INCLUDE_DIR, 0, 0 },
#else /* not CROSS_COMPILE */
/* This should be /usr/local/include and should come before
the fixincludes-fixed header files. */
{ LOCAL_INCLUDE_DIR, 0, 1 },
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
{ TOOL_INCLUDE_DIR, 0, 1 },
{ TOOL_INCLUDE_DIR, 0, 0 },
/* This is the dir for fixincludes. Put it just before
the files that we fix. */
{ GCC_INCLUDE_DIR, 0, 0 },
@ -3275,10 +3275,10 @@ do { ip = &instack[indepth]; \
/* This is now known to be a macro call.
Discard the macro name from the output,
along with any following whitespace just copied,
but preserve newlines at the top level since this
but preserve newlines if not outputting marks since this
is more likely to do the right thing with line numbers. */
obp = op->buf + obufp_before_macroname;
if (ip->macro != 0)
if (output_marks)
op->lineno = op_lineno_before_macroname;
else {
int newlines = op->lineno - op_lineno_before_macroname;
@ -9031,16 +9031,18 @@ dump_single_macro (hp, of)
concat = 0;
for (ap = defn->pattern; ap != NULL; ap = ap->next) {
dump_defn_1 (defn->expansion, offset, ap->nchars, of);
if (ap->nchars != 0)
concat = 0;
offset += ap->nchars;
if (ap->stringify)
fprintf (of, " #");
if (ap->raw_before && !concat)
fprintf (of, " ## ");
concat = 0;
if (!traditional) {
if (ap->nchars != 0)
concat = 0;
if (ap->stringify)
fprintf (of, " #");
if (ap->raw_before && !concat)
fprintf (of, " ## ");
concat = 0;
}
dump_arg_n (defn, ap->argno, of);
if (ap->raw_after) {
if (!traditional && ap->raw_after) {
fprintf (of, " ## ");
concat = 1;
}
@ -9069,7 +9071,7 @@ dump_all_macros ()
/* Output to OF a substring of a macro definition.
BASE is the beginning of the definition.
Output characters START thru LENGTH.
Discard newlines outside of strings, thus
Unless traditional, discard newlines outside of strings, thus
converting funny-space markers to ordinary spaces. */
static void
@ -9082,16 +9084,20 @@ dump_defn_1 (base, start, length, of)
U_CHAR *p = base + start;
U_CHAR *limit = base + start + length;
while (p < limit) {
if (*p == '\"' || *p =='\'') {
U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR,
NULL_PTR, NULL_PTR);
fwrite (p, p1 - p, 1, of);
p = p1;
} else {
if (*p != '\n')
putc (*p, of);
p++;
if (traditional)
fwrite (p, sizeof (*p), length, of);
else {
while (p < limit) {
if (*p == '\"' || *p =='\'') {
U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR,
NULL_PTR, NULL_PTR);
fwrite (p, sizeof (*p), p1 - p, of);
p = p1;
} else {
if (*p != '\n')
putc (*p, of);
p++;
}
}
}
}

View File

@ -2,16 +2,16 @@
{ 1, 0, 0, {0}},
{ 1, 2, 0, {0}},
{ 1, 2, 0, {0}},
{ 0, 0, 1, {SIcode, }},
{ 0, 0, 1, {SIcode, }},
{ 0, 1, 1, {QIcode, }},
{ 0, 1, 1, {HIcode, }},
{ 0, 1, 1, {SIcode, }},
{ 0, 1, 1, {DIcode, }},
{ 0, 1, 1, {SFcode, }},
{ 0, 1, 1, {DFcode, }},
{ 0, 1, 1, {XFcode, }},
{ 0, 1, 1, {Pcode, }},
{ 0, 0, 1, {(char) SIcode, }},
{ 0, 0, 1, {(char) SIcode, }},
{ 0, 1, 1, {(char) QIcode, }},
{ 0, 1, 1, {(char) HIcode, }},
{ 0, 1, 1, {(char) SIcode, }},
{ 0, 1, 1, {(char) DIcode, }},
{ 0, 1, 1, {(char) SFcode, }},
{ 0, 1, 1, {(char) DFcode, }},
{ 0, 1, 1, {(char) XFcode, }},
{ 0, 1, 1, {(char) Pcode, }},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
@ -30,10 +30,10 @@
{ 2, 0, 0, {0}},
{ 3, 0, 0, {0}},
{ 2, 0, 0, {0}},
{ 1, 1, 1, {SIcode, }},
{ 1, 1, 1, {(char) SIcode, }},
{ 1, 1, 0, {0}},
{ 0, 1, 1, {SIcode, }},
{ 0, 1, 1, {SIcode, }},
{ 0, 1, 1, {(char) SIcode, }},
{ 0, 1, 1, {(char) SIcode, }},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
@ -218,15 +218,15 @@
{ 2, 1, 0, {0}},
{ 2, 1, 0, {0}},
{ 4, 1, 0, {0}},
{ 1, 0, 1, {SIcode, }},
{ 1, 0, 1, {SIcode, }},
{ 0, 0, 1, {SIcode, }},
{ 1, 0, 1, {(char) SIcode, }},
{ 1, 0, 1, {(char) SIcode, }},
{ 0, 0, 1, {(char) SIcode, }},
{ 0, 0, 0, {0}},
{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
{ 3, 0, 0, {0}},
{ 0, 1, 0, {0}},
{ 0, 0, 0, {0}},
{ 0, 0, 1, {SIcode, }},
{ 0, 0, 1, {(char) SIcode, }},

View File

@ -268,8 +268,11 @@ int obstack_chunk_size (struct obstack *obstack);
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
#if defined (__GNUC__) && defined (__STDC__)
#if __GNUC__ < 2
#if defined (__GNUC__) && defined (__STDC__) && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */
#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
#define __extension__
#endif

View File

@ -1,5 +1,5 @@
#
# $FreeBSD$
# $Id$
#
LIB= gcc