Initial revision

git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2004-10-28 18:13:23 +00:00
parent 8b36716003
commit 346d84c900
2776 changed files with 1712077 additions and 0 deletions

252
gcc/contrib/ChangeLog Normal file
View File

@@ -0,0 +1,252 @@
Fri Mar 16 12:46:19 GMT 2001 Bernd Schmidt (bernds@redhat.com)
* gcc-2.95.3 Released.
Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.2 Released.
Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.1 Released.
Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95 Released.
Sun Jul 25 23:40:51 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95 Released.
1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary: Replace egcs with gcc. Update e-mail address.
1999-06-12 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary: Set default mail-address and version for egcs
instead of relying on unpredictable pathnames.
Reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>
1999-06-12 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary: Set default mail-address and version for egcs
instead of relying on unpredictable pathnames.
Reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>
Fri Apr 2 16:09:02 1999 Jeffrey A Law (law@cygnus.com)
* fixinc/*: Delete obsolete files.
1999-02-04 Robert Lipe <robertlipe@usa.net>
* egcs_update: Test return values of 'cvs update'. Propogate
to caller as exit values.
1999-01-25 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* egcs_update: Use "if" instead of "&&". Touch generated files
only after the corresponding *.y files.
1999-01-19 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* egcs_update: Do not use xargs, but a backquote construct.
1999-01-07 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary (version): Remove carriage return that gawk inserts
in the version string for some reason.
1998-11-30 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* egcs_update: Only touch files that already exist.
1998-11-29 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary (EOF): Remove double backslash.
Reported by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1998-11-28 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary (address): Set to egcs-testresults mailing list.
1998-11-27 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary (address): Added Marc Lehmann's testsuite-results
to the default e-mail address.
1998-11-25 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary (-p, prepend_logs): Add these before the summary.
(Compiler, Platform): Print these just before configflags.
Sat Oct 31 10:53:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* warn_summary (longLineFilter): New shell function to encapsulate
this functionality. It is off by default, only active if -llf
flag is specified.
(subdirectoryFilter): Fix bug in filtering which made some
subdirectory warnings erroneously appear in the toplevel set.
(stageNfilter): Renamed from `stageNwarns'. Updated to collect
warnings from stage1 as well as stage0, which means warnings from
outside the bootstrap directory. Eg, the libraries, etc.
(warningFilter): New shell function to encapsulate this
functionality.
(keywordFilter): New shell function to encapsulate this
functionality.
Store data in a temp file rather than calculating it 3x. Arrange
to remove it on exit and signals.
Add -pass/-wpass flags to do "pass through" (i.e. manual
inspection) of bootstrap output from a particular stageN as well
as language subdirs.
Add better comments/documentation.
Sat Oct 31 16:39:31 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* egcs_update: Add comment about keeping the FAQ synchronized.
Fri Oct 30 00:39:27 1998 Jeffrey A Law (law@cygnus.com)
* egcs_update: Do touch java/parse.c and java/parse-scan.c. They're
in the repo again.
Fri Oct 16 07:35:00 1998 Bruce Korb <korb@datadesign.com>
* egcs_update: Added gcc/fixinc/* generated files to touch list.
Tue Oct 13 23:28:33 1998 Jeffrey A Law (law@cygnus.com)
* egcs_update: Remove gcc/java/parse.c from list of files to
touch.
Wed Oct 7 13:00:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gperf-2.7-19981006.pat: New file, patch for egcs-local gperf.
Mon Oct 5 14:19:48 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* warn_summary (subdirectoryFilter): New shell function to
optionally filter in/out gcc subdirectories when summarizing
warnings. Add new flags to support subdirectory filtering.
Also, ensure the bootstrap stage is a number. Add some more C
keywords that are preserved in the "warning type" summary and
tighten up the "arg ???" regexp.
Tue Sep 22 07:30 Bruce Korb <korb@datadesign.com>
* fixinc/inclhack.def: Not all C++ comments in C headers
were treated alike. They are now. Also fixed syntax
of sed expression in "systypes" fix.
* fixinc/inclhack.def: Removed SVR4.2-ism from shell invocation
* egcs_update: Added fixinc/* generated files to touch list.
Wed Sep 16 16:06:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* egcs_update: Additionally touch gcc/java/parse.[ch].
Thu Sep 9 16:48 Bruce Korb <korb@datadesign.com>
* fixinc/inclhack.def: Added two files required by
SCO's Open Server 5's avoid_bool fix.
Regenerated fixinc.x and inclhack.sh to incorporate
the update.
Thu Sep 3 10:11:32 1998 Robert Lipe <robertl@dgii.com>
* egcs_update: Do the pass 1 CVS update only for files that
may reasonably be under CVS control.
1998-08-14 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_installed: New script for testing already-installed
gcc/g++/g77.
Wed Aug 12 19:59:36 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* egcs_update: Assigned copyright to FSF.
Tue Aug 11 17:55:53 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Alexandre Oliva <oliva@dcc.unicamp.br>
* egcs_update: New switch --nostdflags and documentation
enhancements.
Tue Aug 11 17:33:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* egcs_update: New script.
1998-08-05 Bruce Korb <korbb@datadesign.com>
* fixinc/Makefile
Added define for target machine so machine-specific tests
can be selected for or against.
* fixinc/fixincl.c
Added an array of string pointers to machines to select
or avoid, depending on a FD_MACH_IFNOT bit flag.
Used a shell script to match the defined TARGET_MACHINE
with any of the given match patterns.
* fixinc/fixincl.tpl
Generate the array of strings and bit flag, as needed,
depending on "mach" and "not_machine" attributes for a fix.
* fixinc/mkfixinc.sh
Invoke the make with TARGET assigned the value of the
machine name argument.
Mon Jul 27 22:08:12 1998 Mike Stump (mrs@wrs.com)
* compare_tests: New script.
1998-07-28 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary: Assigned copyright to FSF.
Mon Jul 27 20:33:02 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* test_summary: Corrected script name in comments providing
documentation. Added linebreaks for lines with > 80 characters.
Fri Jun 19 02:36:59 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary: New switch, -i, and environment variable,
append_logs, for including files in the report.
1998-06-01 Manfred Hollstein <manfred@s-direktnet.de>
* warn_summary: Update to Kaveh's latest version allowing to
specify the last stage built.
1998-05-29 Bruce Korb <korbb@datadesign.com>
* fixinc/mkfixinc.sh
Changes to make it easier to invoke on platforms that
normally do not invoke fixincludes.
* fixinc/inclhack.def
Applied fixes from egcs/gcc/fixincludes from the past several
months.
1998-05-28 Bruce Korb <korbb@datadesign.com>
* fixinc/*: Updated most everything for a first real
try at getting "fast_fixincludes" working.
1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
* index-prop: New file.
Sat May 23 23:38:49 1998 Matthias Klose <doko@cs.tu-berlin.de>
* test_summary: find good awk (copied from warn_summary).
Sat May 23 23:38:33 1998 Jeffrey A Law (law@cygnus.com)
* test_summary, warn_summary: New files

98
gcc/contrib/compare_tests Executable file
View File

@@ -0,0 +1,98 @@
#!/bin/sh
# This script automatically test the given tool with the tool's test cases,
# reporting anything of interest.
# exits with 1 if there is nothing of interest
# exits with 0 if there is something interesting
# exits with 2 if an error occurred
# Give two .sum files to compare them
# Written by Mike Stump <mrs@cygnus.com>
tmp1=/tmp/$tool-testing.$$a
tmp2=/tmp/$tool-testing.$$b
now_s=/tmp/$tool-testing.$$d
before_s=/tmp/$tool-testing.$$e
if [ "$2" = "" ]; then
echo "Usage: $0 previous current" >&2
exit 2
fi
sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" >$tmp1
sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" >$tmp2
before=$tmp1
now=$tmp2
trap "rm -f $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15
sort +0.4 "$now" > "$now_s"
sort +0.4 "$before" > "$before_s"
grep '^FAIL' "$now_s" | sed 's/^....: //' >$tmp1
grep '^PASS' "$before_s" | sed 's/^....: //' | comm -12 $tmp1 - >$tmp2
grep -s . $tmp2 >/dev/null
if [ $? = 0 ]; then
echo "Tests that now fail, but worked before:"
echo
cat $tmp2
echo
fi
grep '^PASS' "$now_s" | sed 's/^....: //' >$tmp1
grep '^FAIL' "$before_s" | sed 's/^....: //' | comm -12 $tmp1 - >$tmp2
grep -s . $tmp2 >/dev/null
if [ $? = 0 ]; then
echo "Tests that now work, but didn't before:"
echo
cat $tmp2
echo
fi
grep '^FAIL' "$now_s" | sed 's/^....: //' >$tmp1
grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^....: //' | comm -23 $tmp1 - >$tmp2
grep -s . $tmp2 >/dev/null
if [ $? = 0 ]; then
echo "New tests that FAIL:"
echo
cat $tmp2
echo
fi
grep '^PASS' "$now_s" | sed 's/^....: //' >$tmp1
grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^....: //' | comm -23 $tmp1 - >$tmp2
grep -s . $tmp2 >/dev/null
if [ $? = 0 ]; then
echo "New tests that PASS:"
echo
cat $tmp2
echo
fi
grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^....: //' >$tmp1
grep '^PASS' "$before_s" | sed 's/^....: //' | comm -13 $tmp1 - >$tmp2
grep -s . $tmp2 >/dev/null
if [ $? = 0 ]; then
echo "Old tests that passed, that have disappeared: (Eeek!)"
echo
cat $tmp2
echo
fi
grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^....: //' >$tmp1
grep '^FAIL' "$before_s" | sed 's/^....: //' | comm -13 $tmp1 - >$tmp2
grep -s . $tmp2 >/dev/null
if [ $? = 0 ]; then
echo "Old tests that failed, that have disappeared: (Eeek!)"
echo
cat $tmp2
echo
fi

202
gcc/contrib/egcs_update Executable file
View File

@@ -0,0 +1,202 @@
#! /bin/sh
#
# Update a local CVS tree from the egcs repository, with an emphasis
# on treating generated files correctly, so that autoconf, bison et
# al are not required for the ``end'' user.
#
# By default all command-line options are passed to `cvs update` in
# addition to $UPDATE_OPTIONS (defined below). If the first parameter
# reads --nostdflags, $UPDATE_OPTIONS as well as this parameter itself
# are omitted.
#
# If the first parameter reads --patch, the second parameter is considered
# a patch file.
#
# If the first parameter is --touch, no cvs operation will be performed,
# only generated files that appear to be out of date in the local tree
# will be touched.
#
# If the first parameter is --list, a list of the generated files and
# their dependencies will be printed; --help prints this message.
#
# Examples:
#
# contrib/egcs_update -r egcs_latest_snapshot
# contrib/egcs_update -A
# contrib/egcs_update --nostdflags -P -r egcs_1_1_branch gcc/testsuite
# contrib/egcs_update --patch some-patch
# contrib/egcs_update --touch
# contrib/egcs_update --list
#
#
# (C) 1998-1999 Free Software Foundation
# Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
#
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
# Default options used when updating via CVS.
UPDATE_OPTIONS=-P
# Add -d to create any directories that exist in the repository but not
# locally.
# Add -A to reset any sticky tags, dates, or `-k' options.
# This function prints a list of all generated files, along with their
# dependencies. Note that only one target is supported per line: the
# colon is stripped from the output.
files_and_dependencies () {
sed -e 's/ *#.*//' -e '/^$/d' -e 's/://' <<\EOF
# All automake dependencies within texinfo
# In fact, not all, since we do not care about sub-directories that
# we do not build. In particular, *.po and *.gmo are not touched.
texinfo/aclocal.m4: texinfo/configure.in texinfo/acinclude.m4
texinfo/Makefile.in: texinfo/Makefile.am texinfo/configure.in texinfo/aclocal.m4
texinfo/configure: texinfo/configure.in texinfo/aclocal.m4
texinfo/stamp-h.in: texinfo/configure.in texinfo/aclocal.m4 texinfo/acconfig.h
texinfo/lib/Makefile.in: texinfo/lib/Makefile.am texinfo/configure.in texinfo/aclocal.m4
texinfo/makeinfo/Makefile.in: texinfo/makeinfo/Makefile.am texinfo/configure.in texinfo/aclocal.m4
texinfo/util/Makefile.in: texinfo/util/Makefile.am texinfo/configure.in texinfo/aclocal.m4
# Now, proceed to gcc automatically generated files
gcc/configure: gcc/configure.in
gcc/cstamp-h.in: gcc/configure.in gcc/acconfig.h
gcc/config.in: gcc/cstamp-h.in
gcc/c-parse.y: gcc/c-parse.in
gcc/c-parse.c: gcc/c-parse.y
gcc/c-parse.h: gcc/c-parse.c
gcc/c-gperf.h: gcc/c-parse.gperf
gcc/cexp.c: gcc/cexp.y
gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
gcc/fixinc/inclhack.sh: gcc/fixinc/inclhack.def gcc/fixinc/inclhack.tpl gcc/fixinc/hackshell.tpl
gcc/fixinc/fixincl.sh: gcc/fixinc/inclhack.def gcc/fixinc/inclhack.tpl
# And then, language-specific files
gcc/cp/parse.c: gcc/cp/parse.y
gcc/cp/parse.h: gcc/cp/parse.c
gcc/objc/objc-parse.y: gcc/c-parse.in
gcc/objc/objc-parse.c: gcc/objc/objc-parse.y
gcc/java/parse.h: gcc/java/parse.y
gcc/java/parse.c: gcc/java/parse.y gcc/java/lex.c gcc/java/parse.h gcc/java/lex.h
gcc/java/parse-scan.c: gcc/java/parse-scan.y gcc/java/lex.c gcc/java/parse.h gcc/java/lex.h
# And libraries, at last
libchill/configure: libchill/configure.in
libf2c/configure: libf2c/configure.in
libf2c/libF77/configure: libf2c/libF77/configure.in
libf2c/libI77/configure: libf2c/libI77/configure.in
libf2c/libU77/configure: libf2c/libU77/configure.in
libf2c/libU77/stamp-h.in: libf2c/libU77/configure.in libf2c/libU77/acconfig.h
libobjc/configure: libobjc/configure.in
EOF
}
# This function checks whether its first argument is newer than all
# the other arguments. It returns success (0) otherwise.
is_out_of_date () {
test `ls -1dt ${1+"$@"} | sed 1q` != "$1"
}
# This function touches generated files such that the ``end'' user does
# not have to rebuild them.
touch_files () {
files_and_dependencies | while read f deps; do
if test -f $f && is_out_of_date "$f" $deps; then
echo Touching "$f"...
touch $f
if is_out_of_date "$f" $deps; then
# Hmm, it may have got the same timestamp as one of
# its touched dependencies. Wait a second and retry
sleep 1
touch $f
fi
fi
done
}
# This functions applies a patch to an existing tree.
apply_patch () {
if [ -f $1 ]; then
echo "Applying patch file $1"
case "$1" in
*gz)
gzip -d -c $1 | patch -p1 ;;
*)
cat $1 | patch -p1 ;;
esac
fi
echo "Adjusting file timestamps"
touch_files
}
# Check whether this indeed looks like a local tree.
if [ ! -f gcc/version.c ]; then
echo "This does not seem to be an egcs tree!"
exit
fi
case "$1" in
# First of all, check whether we are going to process a patch.
--patch)
if test "$#" != 2; then
echo "$1" expects only one argument >&2
exit 1
fi
apply_patch "${2}"
exit $?
;;
--touch)
if test "$#" != 1; then
echo "$1" does not expect any argument >&2
exit 1
fi
touch_files
exit $?
;;
--list)
if test "$#" != 1; then
echo "$1" does not expect any argument >&2
exit 1
fi
files_and_dependencies | sed 's/ /: /'
exit $?
;;
--help)
sed -e '1,2d' -e '/^UPDATE_OPTIONS=/{i\
\
p
}' \
-e '/^$/,$d' -e 's/#//' -e 's/^ //' < $0
exit $?
;;
esac
# Check whether this indeed looks like a local CVS tree.
if [ ! -d CVS ]; then
echo "This does not seem to be an egcs CVS tree!"
exit
fi
# Check command-line options
if [ x"${1}"x = x"--nostdflags"x ]; then
shift
else
set -- $UPDATE_OPTIONS ${1+"$@"}
fi
echo "Updating CVS tree"
cvs -q update ${1+"$@"}
if [ $? -ne 0 ]; then
echo "CVS update of full tree failed." >&2
exit 1
fi
echo "Adjusting file timestamps"
touch_files

View File

@@ -0,0 +1,148 @@
Tue Oct 6 16:18:10 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* key-list.cc (output_keyword_blank_entries): Output
get_fill_default() in the blank entries of keywords as a trailing
list of initializers.
* options.cc: Add support for fill_default.
* options.h: Likewise.
* options.icc: Likewise.
* version.cc: Update to indicate forked version.
diff -rup orig/gperf-2.7/src/key-list.cc gperf-2.7/src/key-list.cc
--- orig/gperf-2.7/src/key-list.cc Wed Apr 15 18:02:51 1998
+++ gperf-2.7/src/key-list.cc Tue Oct 6 15:38:54 1998
@@ -1069,7 +1069,7 @@ output_keyword_blank_entries (int count,
printf (", ");
}
if (option[TYPE])
- printf ("{\"\"}");
+ printf ("{\"\"%s}", option.get_fill_default());
else
printf ("\"\"");
column++;
diff -rup orig/gperf-2.7/src/options.cc gperf-2.7/src/options.cc
--- orig/gperf-2.7/src/options.cc Sat May 2 06:35:16 1998
+++ gperf-2.7/src/options.cc Tue Oct 6 15:20:03 1998
@@ -40,6 +40,9 @@ static const int DEFAULT_JUMP_VALUE = 5;
/* Default name for generated lookup function. */
static const char *const DEFAULT_NAME = "in_word_set";
+/* Default filler for keyword table. */
+static const char *const DEFAULT_FILL = "";
+
/* Default name for the key component. */
static const char *const DEFAULT_KEY = "name";
@@ -66,6 +69,7 @@ int Options::argument_count;
int Options::iterations;
char **Options::argument_vector;
const char *Options::function_name;
+const char *Options::fill_default;
const char *Options::key_name;
const char *Options::class_name;
const char *Options::hash_name;
@@ -265,6 +269,7 @@ Options::Options (void)
jump = DEFAULT_JUMP_VALUE;
option_word = DEFAULTCHARS | C;
function_name = DEFAULT_NAME;
+ fill_default = DEFAULT_FILL;
key_name = DEFAULT_KEY;
hash_name = DEFAULT_HASH_NAME;
wordlist_name = DEFAULT_WORDLIST_NAME;
@@ -306,6 +311,7 @@ Options::~Options (void)
"\nSEVENBIT is....: %s"
"\niterations = %d"
"\nlookup function name = %s"
+ "\nfill default = %s"
"\nhash function name = %s"
"\nword list name = %s"
"\nkey name = %s"
@@ -336,7 +342,7 @@ Options::~Options (void)
option_word & INCLUDE ? "enabled" : "disabled",
option_word & SEVENBIT ? "enabled" : "disabled",
iterations,
- function_name, hash_name, wordlist_name, key_name,
+ function_name, fill_default, hash_name, wordlist_name, key_name,
jump, size - 1, initial_asso_value, delimiters, total_switches);
if (option_word & ALLCHARS)
fprintf (stderr, "all characters are used in the hash function\n");
@@ -379,6 +385,7 @@ static const struct option long_options[
{ "compare-strlen", no_argument, 0, 'l' },
{ "duplicates", no_argument, 0, 'D' },
{ "fast", required_argument, 0, 'f' },
+ { "fill-default", required_argument, 0, 'F' },
{ "initial-asso", required_argument, 0, 'i' },
{ "jump", required_argument, 0, 'j' },
{ "no-strlen", no_argument, 0, 'n' },
@@ -403,7 +410,7 @@ Options::operator() (int argc, char *arg
while ((option_char =
getopt_long (argument_count, argument_vector,
- "adcCDe:Ef:gGhH:i:Ij:k:K:lL:nN:oprs:S:tTvW:Z:7",
+ "adcCDe:Ef:F:gGhH:i:Ij:k:K:lL:nN:oprs:S:tTvW:Z:7",
long_options, (int *)0))
!= -1)
{
@@ -575,6 +582,11 @@ Options::operator() (int argc, char *arg
case 'N': /* Make generated lookup function name be optarg */
{
function_name = /*getopt*/optarg;
+ break;
+ }
+ case 'F': /* Make fill_default be optarg */
+ {
+ fill_default = /*getopt*/optarg;
break;
}
case 'o': /* Order input by frequency of key set occurrence. */
diff -rup orig/gperf-2.7/src/options.h gperf-2.7/src/options.h
--- orig/gperf-2.7/src/options.h Tue Apr 14 06:55:28 1998
+++ gperf-2.7/src/options.h Tue Oct 6 15:12:46 1998
@@ -97,6 +97,7 @@ public:
static int initial_value (void);
static int get_total_switches (void);
static const char *get_function_name (void);
+ static const char *get_fill_default (void);
static const char *get_key_name (void);
static const char *get_class_name (void);
static const char *get_hash_name (void);
@@ -115,6 +116,7 @@ private:
static int iterations; /* Amount to iterate when a collision occurs. */
static char **argument_vector; /* Stores a pointer to command-line vector. */
static const char *function_name; /* Names used for generated lookup function. */
+ static const char *fill_default; /* Expression used to assign default values in keyword table. */
static const char *key_name; /* Name used for keyword key. */
static const char *class_name; /* Name used for generated C++ class. */
static const char *hash_name; /* Name used for generated hash function. */
diff -rup orig/gperf-2.7/src/options.icc gperf-2.7/src/options.icc
--- orig/gperf-2.7/src/options.icc Sat Mar 21 07:51:17 1998
+++ gperf-2.7/src/options.icc Tue Oct 6 15:27:36 1998
@@ -110,6 +110,14 @@ Options::get_function_name (void)
return function_name;
}
+/* Returns the fill default. */
+INLINE const char *
+Options::get_fill_default (void)
+{
+ T (Trace t ("Options::get_fill_default");)
+ return fill_default;
+}
+
/* Returns the keyword key name. */
INLINE const char *
Options::get_key_name (void)
diff -rup orig/gperf-2.7/src/version.cc gperf-2.7/src/version.cc
--- orig/gperf-2.7/src/version.cc Sat May 2 06:29:43 1998
+++ gperf-2.7/src/version.cc Tue Oct 6 16:04:56 1998
@@ -19,4 +19,4 @@ You should have received a copy of the G
along with GNU GPERF; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-const char *version_string = "2.7";
+const char *version_string = "2.7.1 (19981006 egcs)";

25
gcc/contrib/index-prop Executable file
View File

@@ -0,0 +1,25 @@
#! /usr/bin/perl -wi
# Fix up the output of cvs diff -c so that it works with patch.
# We do this by propagating the full pathname from the Index: line
# into the diff itself.
#
# Thrown together by Jason Merrill <jason@cygnus.com>
while (<>)
{
if (/^Index: (.*)/)
{
$full = $1;
print;
for (1..7)
{
$_ = <>;
s/ [^\t]+\t/ $full\t/;
print;
}
}
else
{
print;
}
}

114
gcc/contrib/test_installed Executable file
View File

@@ -0,0 +1,114 @@
#! /bin/sh
# (C) 1998 Free Software Foundation
# Originally by Alexandre Oliva <oliva@dcc.unicamp.br>
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
# This scripts assumes it lives in the contrib directory of the egcs
# source tree, so it will find the testsuite tree from its location.
# If you move it elsewhere, or want to use another testsuite tree, you
# can override the defaults with --srcdir=/some/dir/egcs or
# --testsuite=/some/dir/egcs/gcc/testsuite. If you specify
# --testsuite, --srcdir will be ignored; otherwise, `/gcc/testsuite'
# will be appended to the srcdir.
# You may specify where the binaries to be tested should be picked up
# from. If you specify --prefix=/some/dir, gcc, g++ and g77 will be
# looked for at /some/dir/bin. Each one may be overridden by
# specifying --with-gcc=/pathname/to/gcc, --with-g++=/pathname/to/g++
# and --with-g77=/pathname/to/g77. If you specify --without-gcc,
# --without-g++ or --without-g77, the test for the specified program
# will be skipped. By default, gcc, g++ and g77 will be searched in
# the PATH.
# An additional argument may specify --tmpdir=/some/dir; by default,
# temporaries will be stored in the current directory, where the log
# files will be stored.
# The script will interpret arguments until it finds one it does not
# understand. The remaining ones will be passed to `runtest'. A
# double-dash can be used to explicitly separate the arguments to
# `test_installed' from the ones to `runtest'.
# This script should be run in an empty directory; it will refuse to
# run if it finds a file named site.exp in the current directory.
if test -f site.exp; then
echo site.exp already exists >&2
exit 1
fi
while true; do
case "$1" in
--with-testsuite=*) testsuite=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--srcdir=*) srcdir=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--prefix=*) prefix=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--with-gcc=*) GCC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--with-g++=*) GXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--with-g77=*) G77_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--without-gcc) GCC_UNDER_TEST=no; shift;;
--without-g++) GXX_UNDER_TEST=no; shift;;
--without-g77) G77_UNDER_TEST=no; shift;;
--tmpdir=*) tmpdir=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--help) cat <<\EOF
Runs the testsuite for an installed version of gcc/g++/g77
Copyright (C) 1998 Free Software Foundation
by Alexandre Oliva <oliva@dcc.unicamp.br>
Supported arguments:
--help prints this page
--with-testsuite=/some/dir/gcc/testsuite specify the testsuite directory
--srcdir=/some/dir same as --with-testsuite=/some/dir/gcc/testsuite
[deduced from shell-script pathname]
--prefix=/some/dir use gcc, g++ and g77 from /some/dir/bin [PATH]
--with-gcc=/some/dir/bin/gcc use specified gcc program [gcc]
--with-g++=/some/dir/bin/g++ use specified g++ program [g++]
--with-g77=/some/dir/bin/g77 use specified g77 program [g77]
--without-gcc do not run gcc testsuite
--without-g++ do not run g++ testsuite
--without-g77 do not run g77 testsuite
--tmpdir=/some/dir create temporaries and leave failed programs
at specified directory [.]
-- end of argument list; following arguments are passed to runtest
EOF
exit
;;
--) shift; break;;
*) break;;
esac
done
if test x"${testsuite+set}" != x"set" && test x"${srcdir+set}" != x"set"; then
file=$0
while [ -h $file ]; do
file=`ls -l $file | sed s/'.* -> '//`
done
srcdir=`CDPATH=. && cd \`echo "$file" | sed 's,/*[^/]*$,,;s,^$,.,'\`/.. >/dev/null && pwd`
fi
cat >site.exp <<EOF
set tmpdir "${tmpdir-`pwd`}"
set srcdir "${testsuite-${srcdir}/gcc/testsuite}"
set GCC_UNDER_TEST "${GCC_UNDER_TEST-${prefix}${prefix+/bin/}gcc}"
set GXX_UNDER_TEST "${GXX_UNDER_TEST-${prefix}${prefix+/bin/}g++}"
set G77_UNDER_TEST "${G77_UNDER_TEST-${prefix}${prefix+/bin/}g77}"
EOF
test x"${GCC_UNDER_TEST}" = x"no" || runtest --tool gcc ${1+"$@"}
test x"${GXX_UNDER_TEST}" = x"no" || runtest --tool g++ ${1+"$@"}
test x"${G77_UNDER_TEST}" = x"no" || runtest --tool g77 ${1+"$@"}
exit 0

129
gcc/contrib/test_summary Executable file
View File

@@ -0,0 +1,129 @@
#! /bin/sh
# (C) 1998-1999 Free Software Foundation
# Originally by Alexandre Oliva <oliva@dcc.unicamp.br>
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
# This script processes *.{sum,log} files, producing a shell-script
# that sends e-mail to the appropriate lists and renames files to
# *.sent. It currently handles only gcc, but it should be quite easy
# to modify it to handle other packages and its mailing lists.
# The scripts assumes it is run in the root directory of the build
# tree, and it will include all .sum files it finds in the mail
# report.
# configure flags are extracted from ./config.status
# if the BOOT_CFLAGS environment variable is set, it will be included
# in the mail report too.
# The usage pattern of this script is as follows:
# test_summary | more # so as to observe what should be done
# test_summary | sh # so as to actually send e-mail and move log files
# It accepts a few command line arguments. For example:
# -o: re-reads logs that have been mailed already (.sum.sent)
# -t: prevents logs from being renamed
# -p: prepend specified file (or list of files: -p "a b") to the report
# -i: append specified file (or list of files: -i "a b") to the report
# -m: specify the e-mail address to send notes to. An appropriate default
# should be selected from the log files.
# -f: force reports to be mailed; if omitted, only reports that differ
# from the sent.* version are sent.
# Find a good awk.
if test -z "$AWK" ; then
for AWK in gawk nawk awk ; do
if type $AWK 2>&1 | grep 'not found' > /dev/null 2>&1 ; then
:
else
break
fi
done
fi
: ${filesuffix=}; export fileprefix
: ${move=true}; export move
: ${forcemail=false}; export forcemail
while true; do
case "$1" in
-o) filesuffix=.sent; move=false; : ${mailto=nobody}; shift;;
-t) move=false; shift;;
-p) prepend_logs=${prepend_logs+"$prepend_logs "}"$2"; shift 2;;
-i) append_logs=${append_logs+"$append_logs "}"$2"; shift 2;;
-m) mailto=$2; forcemail=true; shift 2;;
-f) unset mailto; forcemail=true; shift;;
*) break;;
esac
done
: ${mailto="\" address \""}; export mailto
files=`find . -name \*.sum$filesuffix -print`
anyfile=false anychange=$forcemail &&
for file in $files; do
[ -f $file ] &&
anyfile=true &&
{ $anychange ||
anychange=`diff -u $file.sent $file 2>/dev/null |
if test ! -f $file.sent ||
egrep '^[-+](XPASS|FAIL)' >/dev/null; then
echo true
else
echo false
fi
`
}
true
done &&
$anyfile &&
if $forcemail || $anychange; then :; else mailto=nobody; fi &&
$AWK '
BEGIN {
lang="";
address="gcc-testresults@gcc.gnu.org";
version="gcc";
print "cat <<\EOF |";
'${prepend_logs+" system(\"cat $prepend_logs\"); "}'
}
$1 ~ /\/configure$/ { $1 = "configure flags:"; configflags = $0 }
/^Running target / { print ""; print; }
/^Target / { if (host != "") next; else host = $3; }
/^Native / { if (host != "") next; else host = $4; }
/^[ ]*=== [^ ]+ tests ===/ {
if (lang == "") lang = " "$2" "; else lang = " ";
}
/--disable-haifa/ { prefix="haifa-disabled "; }
/--enable-haifa/ { prefix="haifa-enabled "; }
$2 == "version" { save = $0; $1 = ""; $2 = ""; version = $0; gsub(/^ */, "", version); gsub(/\r$/, "", version); $0 = save; }
/\===.*Summary/ { print ""; print; blanks=1; }
/tests ===/ || /^(Target|Host|Native)/ || $2 == "version" { print; blanks=1; }
/^(XPASS|FAIL|# of )/ { print; }
# dumpall != 0 && /^X?(PASS|FAIL|UNTESTED)|^testcase/ { dumpall=0; }
# dumpall != 0 { print; }
# /^FAIL/ { dumpall=1; }
/^$/ && blanks>0 { print; --blanks; }
END { if (lang != "") {
print "";
print "Compiler version: " prefix version lang;
print "Platform: " host;
print configflags;
'${BOOT_CFLAGS+'print "BOOT_CFLAGS='"${BOOT_CFLAGS}"'";'}'
if (boot_cflags != 0) print boot_cflags;
'${append_logs+" system(\"cat $append_logs\"); "}'
print "EOF";
print "Mail -s \"Results for " prefix version lang "testsuite on " host "\" '"${mailto}"' &&";
}}
{ next; }
' ./config.status $files | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" &&
if $move; then
for file in $files `ls -1 $files | sed s/sum$/log/`; do
[ -f $file ] && echo "mv `pwd`/$file `pwd`/$file.sent &&"
done
fi &&
echo true
exit 0

193
gcc/contrib/warn_summary Executable file
View File

@@ -0,0 +1,193 @@
#!/bin/sh
#
# This script parses the output of a gcc bootstrap when using warning
# flags and determines various statistics.
#
# usage: warn_summary [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java]
# [-pass|-wpass] [file(s)]
#
# -llf
# Filter out long lines from the bootstap output before any other
# action. This is useful for systems with broken awks/greps which choke
# on long lines. It is not done by default as it sometimes slows things
# down.
#
# -s number
# Take warnings from stage "Number". Stage 0 means show warnings from
# before and after the gcc bootstrap directory. E.g. libraries, etc.
# This presupposes using "gcc -W*" for the stage1 compiler.
#
# -nosub
# Only show warnings from the gcc top level directory.
# -ch|-cp|-f|-java
# Only show warnings from the specified language subdirectory.
# These flags assume the output contains "Entering/Leaving" messages from
# gnu make. They override each other so only the last one takes effect.
#
# -pass
# Pass through the bootstrap output after filtering stage and subdir
# (useful for manual inspection.) This is all lines, not just warnings.
# -wpass
# Pass through only warnings from the bootstrap output after filtering
# stage and subdir.
#
# By Kaveh Ghazi (ghazi@caip.rutgers.edu) 12/13/97.
# Some awks choke on long lines, sed seems to do a better job.
# Truncate lines > 255 characters. RE '.\{255,\}' doesn't seem to work. :-(
# Only do this if -llf was specified, because it can really slow things down.
longLineFilter()
{
if test -z "$llf" ; then
cat $1
else
sed 's/^\(...............................................................................................................................................................................................................................................................\).*/\1/' $1
fi
}
# This function does one of three things. It either passes through
# all warning data, or passes through gcc toplevel warnings, or passes
# through a particular subdirectory set of warnings.
subdirectoryFilter()
{
longLineFilter $1 | (
if test -z "$filter" ; then
# Pass through all lines.
cat
else
if test "$filter" = nosub ; then
# Omit all subdirectories.
$AWK 'BEGIN{t=1} ; /Entering directory.*\/gcc\/[a-z]/{t--} ; /Leaving directory.*\/gcc\/[a-z]/{t++} ; {if(t==1)print}'
else
# Pass through only subdir $filter.
$AWK "BEGIN {t=-1} ; /^cd $filter; make/{t=0} ; /Entering directory .*\/gcc\/$filter/{t++} ; /Leaving directory .*\/gcc\/$filter/{t--} ; {if(t==1)print}"
fi
fi )
}
# This function displays all lines from stageN of the bootstrap. If
# stage==0, then show lines prior to stage1 and lines from after the last
# stage. I.e. utilities, libraries, etc.
stageNfilter()
{
if test "$stageN" -lt 1 ; then
# stage "0" means check everything *but* gcc.
$AWK "BEGIN{t=1} ; /^Bootstrapping the compiler/{t=0} ; /^Building runtime libraries/{t=1} ; {if(t==1)print}"
else
if test "$stageN" -eq 1 ; then
$AWK "/^Bootstrapping the compiler|^Building the C and C\+\+ compiler/{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}"
else
stageNminus1=`expr $stageN - 1`
$AWK "/stage$stageNminus1/{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}"
fi
fi
}
# This function displays lines containing warnings.
warningFilter()
{
grep ' warning: ' $1
}
# This function replaces `xxx' with `???', where xxx is usually some
# variable or function name. This allows similar warnings to be
# counted together when summarizing. However it avoids replacing
# certain C keywords which are known appear in various messages.
keywordFilter() {
sed 's/.*warning: //;
s/`\(int\)'"'"'/"\1"/g;
s/`\(long\)'"'"'/"\1"/g;
s/`\(char\)'"'"'/"\1"/g;
s/`\(inline\)'"'"'/"\1"/g;
s/`\(else\)'"'"'/"\1"/g;
s/`\(return\)'"'"'/"\1"/g;
s/`\(static\)'"'"'/"\1"/g;
s/`\(extern\)'"'"'/"\1"/g;
s/`\(const\)'"'"'/"\1"/g;
s/`\(noreturn\)'"'"'/"\1"/g;
s/`\(longjmp\)'"'"' or `\(vfork\)'"'"'/"\1" or "\2"/g;
s/`'"[^']*'/"'`???'"'/g;"'
s/.*format, .* arg (arg [0-9][0-9]*)/??? format, ??? arg (arg ???)/;
s/\([( ]\)arg [0-9][0-9]*\([) ]\)/\1arg ???\2/;
s/"\([^"]*\)"/`\1'"'"'/g'
}
# Start the main section.
usage="usage: `basename $0` [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java] [-pass|-wpass] [file(s)]"
stageN=3
tmpfile=/tmp/tmp-warn.$$
# Remove $tmpfile on exit and various signals.
trap "rm -f $tmpfile" 0
trap "rm -f $tmpfile ; exit 1" 1 2 3 5 9 13 15
# Find a good awk.
if test -z "$AWK" ; then
for AWK in gawk nawk awk ; do
if type $AWK 2>&1 | grep 'not found' > /dev/null 2>&1 ; then
:
else
break
fi
done
fi
# Parse command line arguments.
while test -n "$1" ; do
case "$1" in
-llf) llf=1 ; shift ;;
-s) if test -z "$2"; then echo $usage; exit 1; fi; stageN="$2"; shift 2 ;;
-s*) stageN="`expr $1 : '-s\(.*\)'`" ; shift ;;
-nosub|-ch|-cp|-f|-java) filter="`expr $1 : '-\(.*\)'`" ; shift ;;
-pass) pass=1 ; shift ;;
-wpass) pass=w ; shift ;;
-*) echo $usage ; exit 1 ;;
*) break ;;
esac
done
# Check for a valid value of $stageN.
case "$stageN" in
[0-9]) ;;
*) echo "Stage <$stageN> must be in the range [0..9]." ; exit 1 ;;
esac
for file in "$@" ; do
subdirectoryFilter $file | stageNfilter > $tmpfile
# (Just) show me the warnings.
if test "$pass" != '' ; then
if test "$pass" = w ; then
warningFilter $tmpfile
else
cat $tmpfile
fi
continue
fi
if test -z "$filter" ; then
echo "Counting all warnings,"
else
if test "$filter" = nosub ; then
echo "Counting non-subdirectory warnings,"
else
echo "Counting warnings in the gcc/$filter subdirectory,"
fi
fi
count=`warningFilter $tmpfile | wc -l`
echo there are $count warnings in stage$stageN of this bootstrap.
echo
echo Number of warnings per file:
warningFilter $tmpfile | $AWK -F: '{print$1}' | sort | uniq -c | sort -nr
echo
echo Number of warning types:
warningFilter $tmpfile | keywordFilter | sort | uniq -c | sort -nr
done