diff options
Diffstat (limited to 'lang/gcc44/files')
-rw-r--r-- | lang/gcc44/files/alpha-freebsd.h | 2 | ||||
-rw-r--r-- | lang/gcc44/files/patch-ad | 30 | ||||
-rw-r--r-- | lang/gcc44/files/patch-af | 110 | ||||
-rw-r--r-- | lang/gcc44/files/patch-ak | 38 | ||||
-rw-r--r-- | lang/gcc44/files/patch-al | 53 | ||||
-rw-r--r-- | lang/gcc44/files/patch-bc | 29 | ||||
-rw-r--r-- | lang/gcc44/files/patch-fa | 232 | ||||
-rw-r--r-- | lang/gcc44/files/patch-fb | 13 | ||||
-rw-r--r-- | lang/gcc44/files/patch-fc | 21 | ||||
-rw-r--r-- | lang/gcc44/files/patch-va | 20 |
10 files changed, 446 insertions, 102 deletions
diff --git a/lang/gcc44/files/alpha-freebsd.h b/lang/gcc44/files/alpha-freebsd.h index 60a1f07b94b..e6f81cca503 100644 --- a/lang/gcc44/files/alpha-freebsd.h +++ b/lang/gcc44/files/alpha-freebsd.h @@ -52,7 +52,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "\ -D__alpha__ -D__alpha -Acpu(alpha) -Amachine(alpha) " \ -FBSD_CPP_PREDEFINES \ +CPP_FBSD_PREDEFINES \ SUB_CPP_PREDEFINES /* Make gcc agree with <machine/ansi.h> */ diff --git a/lang/gcc44/files/patch-ad b/lang/gcc44/files/patch-ad index bea070deb34..dcddb18e53b 100644 --- a/lang/gcc44/files/patch-ad +++ b/lang/gcc44/files/patch-ad @@ -1,5 +1,5 @@ ---- gcc/config/i386/freebsd-aout.h.orig Mon Mar 1 14:47:33 1999 -+++ gcc/config/i386/freebsd-aout.h Sat Mar 20 00:27:02 1999 +--- gcc/config/i386/freebsd-aout.h.orig Tue Mar 23 13:34:48 1999 ++++ gcc/config/i386/freebsd-aout.h Mon Apr 19 15:10:47 1999 @@ -20,6 +20,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ @@ -8,25 +8,31 @@ +/* Get generic FreeBSD definitions. */ +#include <freebsd.h> + - /* 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 -@@ -35,7 +39,7 @@ +@@ -32,12 +36,10 @@ #include "i386/perform.h" + /* This goes away when the math-emulator is fixed */ +-#undef TARGET_DEFAULT +-#define TARGET_DEFAULT \ +- (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) ++#define TARGET_CPU_DEFAULT 0400 /* TARGET_NO_FANCY_MATH_387 */ + #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)" +#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES /* Like the default, except no -lg. */ #define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}" -@@ -85,14 +89,6 @@ +@@ -87,14 +89,6 @@ necessary when compiling PIC code. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 - --/* Don't default to pcc-struct-return, because gcc is the only compiler, and -- we want to retain compatibility with older gcc versions. */ +-/* Don't default to pcc-struct-return, because in FreeBSD we prefer the +- superior nature of the older gcc way. */ -#define DEFAULT_PCC_STRUCT_RETURN 0 - -/* Ensure we the configuration knows our system correctly so we can link with @@ -35,7 +41,7 @@ /* i386 freebsd still uses old binutils that don't insert nops by default when the .align directive demands to insert extra space in the text -@@ -103,19 +99,18 @@ +@@ -105,19 +99,18 @@ /* Profiling routines, partially copied from i386/osfrose.h. */ @@ -58,7 +64,7 @@ fprintf (FILE, "\tcall mcount\n"); \ } \ } -@@ -133,6 +128,7 @@ +@@ -135,6 +128,7 @@ #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" @@ -66,7 +72,7 @@ /* The following macro defines the format used to output the second operand of the .type assembler directive. Different svr4 assemblers -@@ -142,6 +138,12 @@ +@@ -144,6 +138,12 @@ #define TYPE_OPERAND_FMT "@%s" @@ -79,7 +85,7 @@ /* Write the extra assembler code needed to declare a function's result. Most svr4 assemblers don't require any special declaration of the result value, but there are exceptions. */ -@@ -244,29 +246,4 @@ +@@ -246,29 +246,4 @@ "%{shared:c++rt0.o%s} \ %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}" diff --git a/lang/gcc44/files/patch-af b/lang/gcc44/files/patch-af index c1f1ba0e855..88bf144d3da 100644 --- a/lang/gcc44/files/patch-af +++ b/lang/gcc44/files/patch-af @@ -1,30 +1,22 @@ ---- gcc/config/i386/freebsd.h.orig Mon Mar 1 14:47:32 1999 -+++ gcc/config/i386/freebsd.h Sun Mar 21 16:58:39 1999 -@@ -21,19 +21,13 @@ +--- gcc/config/i386/freebsd.h.orig Tue Feb 16 15:51:31 1999 ++++ gcc/config/i386/freebsd.h Mon Apr 19 09:22:46 1999 +@@ -21,6 +21,15 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + ++/* Use stabs instead of DWARF debug format. */ ++#undef PREFERRED_DEBUGGING_TYPE ++#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ++#include "svr4.h" ++ +/* Get generic FreeBSD definitions. */ +#include <freebsd.h> + #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); --/* The svr4 ABI for the i386 says that records and unions are returned -- in memory. */ --/* On FreeBSD, we do not. */ --#undef DEFAULT_PCC_STRUCT_RETURN --#define DEFAULT_PCC_STRUCT_RETURN 0 -- --/* This gets defined in tm.h->linux.h->svr4.h, and keeps us from using -- libraries compiled with the native cc, so undef it. */ --#undef NO_DOLLAR_IN_LABEL -- - /* This is how to output an element of a case-vector that is relative. - This is only used for PIC code. See comments by the `casesi' insn in - i386.md for an explanation of the expression this outputs. */ -@@ -113,22 +107,19 @@ +@@ -113,22 +122,19 @@ : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \ : (-1)) @@ -51,20 +43,17 @@ } \ } -@@ -145,26 +136,16 @@ +@@ -145,27 +151,31 @@ #define WCHAR_TYPE_SIZE BITS_PER_WORD #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)" -+#define CPP_PREDEFINES "-Di386 -D__ELF__ -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES ++#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES #undef CPP_SPEC -#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" -+#define CPP_SPEC \ -+ "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{m486:-D__i486__}" -+ /* %{pthread:-D_REENTRANT} */ - - #undef LIB_SPEC +- +-#undef LIB_SPEC -#if 1 -/* We no longer link with libc_p.a or libg.a by default. If you - * want to profile or debug the C library, please add @@ -73,13 +62,78 @@ -#define LIB_SPEC \ - "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \ - %{!ggdb:-lc} %{ggdb:-lg}}" --#else - #define LIB_SPEC \ ++#if TARGET_CPU_DEFAULT == 2 ++#define CPP_SPEC "\ ++%{!maout: -D__ELF__} \ ++%{munderscores: -D__UNDERSCORES__} \ ++%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ ++%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__}" + #else +-#define LIB_SPEC \ - "%{!shared: \ - %{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ - %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}" --#endif -+ "%{!shared:%{!pg:%{!pthread:%{!kthread:-lc}%{kthread:-lpthread -lc}}%{pthread:-lc_r}}%{pg:%{!pthread:%{!kthread:-lc_p}%{kthread:-lpthread_p -lc_p}}%{pthread:-lc_r_p}}}" ++#define CPP_SPEC "\ ++%{!maout: -D__ELF__} \ ++%{munderscores: -D__UNDERSCORES__} \ ++%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ ++%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__}" + #endif ++#undef CC1_SPEC ++#define CC1_SPEC "\ ++%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ ++%{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}" ++ ++#undef ASM_SPEC ++#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}" ++ /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support for the special GCC options -static and -shared, which allow us to + link things in one of these three modes by applying the appropriate +@@ -181,13 +191,23 @@ + done. */ + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf_i386 %{shared:-shared} \ +- %{!shared: \ +- %{!ibcs: \ ++#define LINK_SPEC "\ ++ %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ ++ %{maout: %{shared:-Bshareable} \ ++ %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ ++ %{pg:-Bstatic} %{Z}} \ ++ %{assert*} %{R*}} \ ++ %{!maout: \ ++ -m elf_i386 \ ++ %{Wl,*:%*} \ ++ %{assert*} %{R*} %{rpath*} %{defsym*} \ ++ %{shared:-Bshareable %{h*} %{soname*}} \ ++ %{symbolic:-Bsymbolic} \ ++ %{!shared: \ + %{!static: \ +- %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \ +- %{static:-static}}}" ++ %{rdynamic: -export-dynamic} \ ++ %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ ++ %{static:-Bstatic}}}" + + /* Get perform_* macros to build libgcc.a. */ + +@@ -204,3 +224,15 @@ + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ + } + #endif ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC "\ ++ %{maout: %{shared:c++rt0.o%s} \ ++ %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \ ++ %{!maout: %{!shared: \ ++ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \ ++ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC \ ++ "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}" diff --git a/lang/gcc44/files/patch-ak b/lang/gcc44/files/patch-ak index 2e54beea1a6..a1c26dbc744 100644 --- a/lang/gcc44/files/patch-ak +++ b/lang/gcc44/files/patch-ak @@ -1,11 +1,11 @@ ---- gcc/configure.orig Sun Mar 14 02:59:02 1999 -+++ gcc/configure Sat Mar 20 00:40:05 1999 -@@ -2395,6 +2395,15 @@ +--- gcc/configure.orig Sun Apr 18 02:33:12 1999 ++++ gcc/configure Mon Apr 19 15:16:14 1999 +@@ -3022,6 +3022,15 @@ thread_file='posix' fi ;; + alpha*-*-freebsd*) -+ tm_file="${tm_file} freebsd.h alpha/freebsd.h alpha/freebsd-elf.h" ++ tm_file="${tm_file} freebsd.h alpha/freebsd.h" + xm_file="${xm_file} xm-freebsd.h" + target_cpu_default="MASK_GAS" + tmake_file="t-freebsd alpha/t-crtbe" @@ -14,9 +14,9 @@ + gas=yes gnu_ld=yes + ;; alpha*-*-netbsd*) - tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h" - xm_file="xm-netbsd.h ${xm_file}" -@@ -2851,21 +2860,21 @@ + tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h" + target_cpu_default="MASK_GAS" +@@ -3500,19 +3509,19 @@ # Next line turned off because both 386BSD and BSD/386 use GNU ld. # use_collect2=yes ;; @@ -24,26 +24,22 @@ - tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h" + i[34567]86-*-freebsdaout*) + tm_file=i386/freebsd-aout.h ++ tmake_file=t-freebsd ++ ;; ++ i[34567]86-*-freebsd*) ++ tm_file="i386/i386.h i386/att.h i386/freebsd.h i386/perform.h" # On FreeBSD, the headers are already ok, except for math.h. fixincludes=fixinc.wrap -- extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" - tmake_file=i386/t-freebsd -- gas=yes -- gnu_ld=yes -- stabs=yes + tmake_file=t-freebsd - ;; - i[34567]86-*-freebsd*) + gas=yes + gnu_ld=yes + stabs=yes +- ;; +- i[34567]86-*-freebsd*) - tm_file=i386/freebsd.h -+ tm_file="i386/i386.h i386/att.h linux.h i386/freebsd.h i386/perform.h" - # On FreeBSD, the headers are already ok, except for math.h. - fixincludes=fixinc.wrap - tmake_file=i386/t-freebsd -+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" -+ tmake_file=t-freebsd -+ gas=yes -+ gnu_ld=yes -+ stabs=yes ;; i[34567]86-*-netbsd*) tm_file=i386/netbsd.h diff --git a/lang/gcc44/files/patch-al b/lang/gcc44/files/patch-al index c8a195127ed..3b9fb19a38b 100644 --- a/lang/gcc44/files/patch-al +++ b/lang/gcc44/files/patch-al @@ -1,11 +1,11 @@ ---- gcc/configure.in.orig Sun Mar 7 16:22:22 1999 -+++ gcc/configure.in Sat Mar 20 00:40:58 1999 -@@ -416,6 +416,15 @@ +--- gcc/configure.in.orig Wed Apr 14 18:50:50 1999 ++++ gcc/configure.in Mon Apr 19 15:16:14 1999 +@@ -606,6 +606,15 @@ thread_file='posix' fi ;; + alpha*-*-freebsd*) -+ tm_file="${tm_file} freebsd.h alpha/freebsd.h alpha/freebsd-elf.h" ++ tm_file="${tm_file} freebsd.h alpha/freebsd.h" + xm_file="${xm_file} xm-freebsd.h" + target_cpu_default="MASK_GAS" + tmake_file="t-freebsd alpha/t-crtbe" @@ -14,36 +14,37 @@ + gas=yes gnu_ld=yes + ;; alpha*-*-netbsd*) - tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h" - xm_file="xm-netbsd.h ${xm_file}" -@@ -872,21 +881,21 @@ - # Next line turned off because both 386BSD and BSD/386 use GNU ld. + tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h" + target_cpu_default="MASK_GAS" +@@ -1117,22 +1126,22 @@ # use_collect2=yes ;; -- i[[34567]]86-*-freebsdelf*) + changequote(,)dnl +- i[34567]86-*-freebsdelf*) ++ i[34567]86-*-freebsdaout*) + changequote([,])dnl - tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h" -+ i[[34567]]86-*-freebsdaout*) + tm_file=i386/freebsd-aout.h ++ tmake_file=t-freebsd ++ ;; ++changequote(,)dnl ++ i[34567]86-*-freebsd*) ++changequote([,])dnl ++ tm_file="i386/i386.h i386/att.h i386/freebsd.h i386/perform.h" # On FreeBSD, the headers are already ok, except for math.h. fixincludes=fixinc.wrap -- extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" - tmake_file=i386/t-freebsd -- gas=yes -- gnu_ld=yes -- stabs=yes + tmake_file=t-freebsd - ;; - i[[34567]]86-*-freebsd*) + gas=yes + gnu_ld=yes + stabs=yes +- ;; +-changequote(,)dnl +- i[34567]86-*-freebsd*) +-changequote([,])dnl - tm_file=i386/freebsd.h -+ tm_file="i386/i386.h i386/att.h linux.h i386/freebsd.h i386/perform.h" - # On FreeBSD, the headers are already ok, except for math.h. - fixincludes=fixinc.wrap - tmake_file=i386/t-freebsd -+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" -+ tmake_file=t-freebsd -+ gas=yes -+ gnu_ld=yes -+ stabs=yes ;; - i[[34567]]86-*-netbsd*) - tm_file=i386/netbsd.h + changequote(,)dnl + i[34567]86-*-netbsd*) diff --git a/lang/gcc44/files/patch-bc b/lang/gcc44/files/patch-bc index c6faefae79d..e0198b22cc6 100644 --- a/lang/gcc44/files/patch-bc +++ b/lang/gcc44/files/patch-bc @@ -1,16 +1,16 @@ ---- libstdc++/Makefile.in.orig Sat Jul 11 19:20:49 1998 -+++ libstdc++/Makefile.in Sun Mar 14 21:48:39 1999 +--- libstdc++/Makefile.in.orig Fri Apr 2 06:17:48 1999 ++++ libstdc++/Makefile.in Sun Apr 18 16:57:55 1999 @@ -14,7 +14,7 @@ # along with this library; see the file COPYING. If not, write to the Free # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -VERSION = 2.9.0 -+VERSION = 3 ++VERSION = 4 + INTERFACE = 2 - OBJS = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o - SUBLIBS = $(STAMP)-string $(STAMP)-complx -@@ -98,7 +98,8 @@ - ln -f -s $(SHLIB) $(SHLINK) + gxx_include_dir=${includedir}/g++ +@@ -111,7 +111,8 @@ + $(LN_S) $(SHLIB) $(SHLINK) || cp $(ARLIB) $(ARLINK) mshlink: - @$(MAKE) $(MSHLINK) "SHLINK=$(MSHLINK)" @@ -19,15 +19,16 @@ $(IO_DIR)/iostream.list: force cd $(IO_DIR) ; $(MAKE) $(FLAGS_TO_PASS) iostream.list -@@ -281,10 +282,7 @@ - if [ $$FILE = $(SHLINK) ] ; then \ - ln -f -s $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ +@@ -335,11 +336,7 @@ + || cp $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + fi; \ elif [ $$FILE = mshlink ]; then \ - for FILE in $(MSHLINK) ; do \ - rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ -- ln -f -s $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ +- $(LN_S) $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \ +- || cp $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ - done; \ + true; \ - elif [ $$FILE = $(SHLIB) ]; then \ - $(INSTALL_PROGRAM) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ - : On the HP, shared libraries must be mode 555. ;\ + elif [ $$FILE = marlink ]; then \ + for FILE in $(MARLINK) ; do \ + rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ diff --git a/lang/gcc44/files/patch-fa b/lang/gcc44/files/patch-fa new file mode 100644 index 00000000000..7f5e0e611ae --- /dev/null +++ b/lang/gcc44/files/patch-fa @@ -0,0 +1,232 @@ +--- gcc/c-common.c.orig Mon Feb 15 16:40:05 1999 ++++ gcc/c-common.c Tue Mar 30 03:35:22 1999 +@@ -61,7 +61,7 @@ + int, int, int)); + static void init_attributes PROTO((void)); + static void record_function_format PROTO((tree, tree, enum format_type, +- int, int)); ++ int, int, int)); + static void record_international_format PROTO((tree, tree, int)); + + /* Keep a stack of if statements. We record the number of compound +@@ -669,6 +669,7 @@ + = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (args))); + int format_num; + int first_arg_num; ++ int null_format_ok; + enum format_type format_type; + tree argument; + int arg_num; +@@ -682,7 +683,7 @@ + + if (TREE_CODE (format_type_id) != IDENTIFIER_NODE) + { +- error ("unrecognized format specifier"); ++ error_with_decl (decl, "unrecognized format specifier"); + continue; + } + else +@@ -690,12 +691,26 @@ + char *p = IDENTIFIER_POINTER (format_type_id); + + if (!strcmp (p, "printf") || !strcmp (p, "__printf__")) ++ { ++ format_type = printf_format_type; ++ null_format_ok = 0; ++ } ++ else if (!strcmp (p, "printf0") || !strcmp (p, "__printf0__")) ++ { + format_type = printf_format_type; ++ null_format_ok = 1; ++ } + else if (!strcmp (p, "scanf") || !strcmp (p, "__scanf__")) ++ { + format_type = scanf_format_type; ++ null_format_ok = 0; ++ } + else if (!strcmp (p, "strftime") + || !strcmp (p, "__strftime__")) ++ { + format_type = strftime_format_type; ++ null_format_ok = 0; ++ } + else + { + error ("`%s' is an unrecognized format function type", p); +@@ -766,7 +781,8 @@ + + record_function_format (DECL_NAME (decl), + DECL_ASSEMBLER_NAME (decl), +- format_type, format_num, first_arg_num); ++ format_type, null_format_ok, format_num, ++ first_arg_num); + break; + } + +@@ -1010,6 +1026,11 @@ + } format_char_info; + + static format_char_info print_char_table[] = { ++/* FreeBSD kernel extensions. */ ++ { "D", 1, T_C, T_C, NULL, NULL, NULL, NULL, NULL, "-wp" }, ++ { "b", 1, T_C, T_C, NULL, NULL, NULL, NULL, NULL, "-wp" }, ++ { "rz", 0, NULL, T_I, T_I, T_L, NULL, NULL, NULL, "-wp0 +#" }, ++#define unextended_print_char_table (print_char_table + 3) + { "di", 0, T_I, T_I, T_I, T_L, T_LL, T_LL, T_ST, "-wp0 +" }, + { "oxX", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0#" }, + { "u", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0" }, +@@ -1070,6 +1091,7 @@ + tree name; /* identifier such as "printf" */ + tree assembler_name; /* optional mangled identifier (for C++) */ + enum format_type format_type; /* type of format (printf, scanf, etc.) */ ++ int null_format_ok; /* TRUE if the format string may be NULL */ + int format_num; /* number of format argument */ + int first_arg_num; /* number of first arg (zero for varargs) */ + } function_format_info; +@@ -1102,25 +1124,25 @@ + init_function_format_info () + { + record_function_format (get_identifier ("printf"), NULL_TREE, +- printf_format_type, 1, 2); ++ printf_format_type, 0, 1, 2); + record_function_format (get_identifier ("fprintf"), NULL_TREE, +- printf_format_type, 2, 3); ++ printf_format_type, 0, 2, 3); + record_function_format (get_identifier ("sprintf"), NULL_TREE, +- printf_format_type, 2, 3); ++ printf_format_type, 0, 2, 3); + record_function_format (get_identifier ("scanf"), NULL_TREE, +- scanf_format_type, 1, 2); ++ scanf_format_type, 0, 1, 2); + record_function_format (get_identifier ("fscanf"), NULL_TREE, +- scanf_format_type, 2, 3); ++ scanf_format_type, 0, 2, 3); + record_function_format (get_identifier ("sscanf"), NULL_TREE, +- scanf_format_type, 2, 3); ++ scanf_format_type, 0, 2, 3); + record_function_format (get_identifier ("vprintf"), NULL_TREE, +- printf_format_type, 1, 0); ++ printf_format_type, 0, 1, 0); + record_function_format (get_identifier ("vfprintf"), NULL_TREE, +- printf_format_type, 2, 0); ++ printf_format_type, 0, 2, 0); + record_function_format (get_identifier ("vsprintf"), NULL_TREE, +- printf_format_type, 2, 0); ++ printf_format_type, 0, 2, 0); + record_function_format (get_identifier ("strftime"), NULL_TREE, +- strftime_format_type, 3, 0); ++ strftime_format_type, 0, 3, 0); + + record_international_format (get_identifier ("gettext"), NULL_TREE, 1); + record_international_format (get_identifier ("dgettext"), NULL_TREE, 2); +@@ -1137,11 +1159,12 @@ + (e.g. for varargs such as vfprintf). */ + + static void +-record_function_format (name, assembler_name, format_type, ++record_function_format (name, assembler_name, format_type, null_format_ok, + format_num, first_arg_num) + tree name; + tree assembler_name; + enum format_type format_type; ++ int null_format_ok; + int format_num; + int first_arg_num; + { +@@ -1165,6 +1188,7 @@ + } + + info->format_type = format_type; ++ info->null_format_ok = null_format_ok; + info->format_num = format_num; + info->first_arg_num = first_arg_num; + } +@@ -1314,7 +1338,8 @@ + + if (integer_zerop (format_tree)) + { +- warning ("null format string"); ++ if (!info->null_format_ok) ++ warning ("null format string"); + return; + } + if (TREE_CODE (format_tree) != ADDR_EXPR) +@@ -1485,12 +1510,13 @@ + It will work on most machines, because size_t and int + have the same mode. But might as well warn anyway, + since it will fail on other machines. */ ++ /* XXX should we allow unsigned ints here? */ + if ((TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) + != integer_type_node) + && + (TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) + != unsigned_type_node)) +- warning ("field width is not type int (arg %d)", arg_num); ++ warning ("precision is not type int (arg %d)", arg_num); + } + } + else +@@ -1535,6 +1561,53 @@ + } + } + } ++ if (*format_chars == 'b') ++ { ++ /* There should be an int arg to control the string arg. */ ++ if (params == 0) ++ { ++ warning (tfaff); ++ return; ++ } ++ if (info->first_arg_num != 0) ++ { ++ cur_param = TREE_VALUE (params); ++ params = TREE_CHAIN (params); ++ ++arg_num; ++ if ((TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) ++ != integer_type_node) ++ && ++ (TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) ++ != unsigned_type_node)) ++ { ++ warning ("bitmap is not type int (arg %d)", arg_num); ++ } ++ } ++ } ++ if (*format_chars == 'D') ++ { ++ /* There should be an unsigned char * arg before the string arg. */ ++ if (params == 0) ++ { ++ warning (tfaff); ++ return; ++ } ++ if (info->first_arg_num != 0) ++ { ++ cur_param = TREE_VALUE (params); ++ params = TREE_CHAIN (params); ++ ++arg_num; ++ cur_type = TREE_TYPE (cur_param); ++ if (TREE_CODE (cur_type) != POINTER_TYPE ++ || TYPE_MAIN_VARIANT (TREE_TYPE (cur_type)) ++ != unsigned_char_type_node) ++ { ++ warning ("ethernet address is not type unsigned char *" ++ " (arg %d)", ++ arg_num); ++ } ++ } ++ } + + aflag = 0; + +@@ -1604,7 +1677,8 @@ + switch (info->format_type) + { + case printf_format_type: +- fci = print_char_table; ++ fci = flag_format_extensions ? print_char_table ++ : unextended_print_char_table; + break; + case scanf_format_type: + fci = scan_char_table; diff --git a/lang/gcc44/files/patch-fb b/lang/gcc44/files/patch-fb new file mode 100644 index 00000000000..dae6d331898 --- /dev/null +++ b/lang/gcc44/files/patch-fb @@ -0,0 +1,13 @@ +--- gcc/flags.h.orig Sun Jan 31 09:46:18 1999 ++++ gcc/flags.h Tue Mar 30 13:17:11 1999 +@@ -137,6 +137,10 @@ + + extern int warn_aggregate_return; + ++/* Nonzero means that -Wformat accepts certain non-ANSI formats. */ ++ ++extern int flag_format_extensions; ++ + /* Nonzero if generating code to do profiling. */ + + extern int profile_flag; diff --git a/lang/gcc44/files/patch-fc b/lang/gcc44/files/patch-fc new file mode 100644 index 00000000000..a3f44c5e158 --- /dev/null +++ b/lang/gcc44/files/patch-fc @@ -0,0 +1,21 @@ +--- gcc/toplev.c.orig Mon Mar 22 15:23:26 1999 ++++ gcc/toplev.c Tue Mar 30 13:13:44 1999 +@@ -754,6 +754,9 @@ + + int flag_no_ident = 0; + ++/* Nonzero means that -Wformat accepts certain system-dependent formats. */ ++int flag_format_extensions = 0; ++ + /* Table of supported debugging formats. */ + static struct + { +@@ -954,6 +957,8 @@ + "Generate code to check every memory access" }, + {"prefix-function-name", &flag_prefix_function_name, 1, + "Add a prefix to all function names" }, ++ {"format-extensions", &flag_format_extensions, 1, ++ "-Wformat accepts certain FreeBSD system-dependent formats" }, + {"dump-unnumbered", &flag_dump_unnumbered, 1, + "Suppress output of instruction numbers and line number notes in debugging dumps"}, + {"instrument-functions", &flag_instrument_function_entry_exit, 1, diff --git a/lang/gcc44/files/patch-va b/lang/gcc44/files/patch-va new file mode 100644 index 00000000000..48040ffa6e9 --- /dev/null +++ b/lang/gcc44/files/patch-va @@ -0,0 +1,20 @@ +--- gcc/Makefile.in.orig Thu Feb 25 12:40:16 1999 ++++ gcc/Makefile.in Mon Mar 1 04:36:40 1999 +@@ -793,7 +793,7 @@ + rm -f config.run + + $(srcdir)/configure: $(srcdir)/configure.in +- cd $(srcdir); autoconf ++ cd $(srcdir); echo "wants to run autoconf" + + # cstamp-h.in controls rebuilding of config.in. + # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't +@@ -806,7 +806,7 @@ + # ??? Newer versions have a maintainer mode that may be useful here. + $(srcdir)/config.in: $(srcdir)/cstamp-h.in + $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h +- cd $(srcdir) && autoheader ++ cd $(srcdir) && echo "want to run autoheader" + @rm -f $(srcdir)/cstamp-h.in + echo timestamp > $(srcdir)/cstamp-h.in + auto-host.h: cstamp-h ; @true |