Add "--broken-undeftoken-init" option. This makes Bison 1.28 bug compatable
with version 1.25. Bison 1.28 fixed a bug in the initialization of the `undefined' symbol table entry. Unfortunately something about the way we are compiling egcs-1.1.2's cc1plus breaks with this bugfix. "--broken-undeftoken-init" is needed when compiling cc1plus. Otherwise /usr/libexec/cc1plus cannot compile libgcc.
This commit is contained in:
parent
a98373454d
commit
a9aea92dee
@ -31,6 +31,7 @@ int nolinesflag;
|
||||
int noparserflag = 0;
|
||||
int toknumflag = 0;
|
||||
int rawtoknumflag = 0;
|
||||
int broken_undeftoken_init;
|
||||
char *spec_name_prefix; /* for -p. */
|
||||
char *spec_file_prefix; /* for -b. */
|
||||
extern int fixed_outfiles;/* for -y */
|
||||
@ -44,6 +45,7 @@ extern void warns PARAMS((char *, char *)); /* main.c */
|
||||
|
||||
struct option longopts[] =
|
||||
{
|
||||
{"broken-undeftoken-init", 0, &broken_undeftoken_init, 1},
|
||||
{"debug", 0, &debugflag, 1},
|
||||
{"defines", 0, &definesflag, 1},
|
||||
{"file-prefix", 1, 0, 'b'},
|
||||
|
@ -44,6 +44,7 @@ The entry point is reader(). */
|
||||
int rline_allocated;
|
||||
|
||||
extern char *program_name;
|
||||
extern int broken_undeftoken_init;
|
||||
extern int definesflag;
|
||||
extern int nolinesflag;
|
||||
extern int noparserflag;
|
||||
@ -199,7 +200,10 @@ reader (void)
|
||||
/* it is always token number 2. */
|
||||
undeftoken = getsym("$undefined.");
|
||||
undeftoken->class = STOKEN;
|
||||
undeftoken->user_token_number = 2;
|
||||
/* XXX ``broken_undeftoken_init'' makes Bison 1.28 bug-compatable
|
||||
with Bison 1.25. FreeBSD depends on this behavior when compiling
|
||||
EGCS-1.1.2's cc1plus. */
|
||||
undeftoken->user_token_number = broken_undeftoken_init ? 0 : 2;
|
||||
/* Read the declaration section. Copy %{ ... %} groups to ftable and fdefines file.
|
||||
Also notice any %token, %left, etc. found there. */
|
||||
if (noparserflag)
|
||||
|
Loading…
Reference in New Issue
Block a user