This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix
- From: "Joel E. Denny" <jdenny at clemson dot edu>
- To: Danny Backx <danny dot backx at scarlet dot be>
- Cc: help-bison at gnu dot org, binutils <binutils at sourceware dot org>, Ismail Khatib <ikhatib at imail dot de>
- Date: Tue, 28 Apr 2009 14:46:08 -0400 (EDT)
- Subject: Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix
- References: <1240894275.29047.50.camel@dannypc>
On Tue, 28 Apr 2009, Danny Backx wrote:
> Now the result (below) appears to be that the MacOS problem in the
> binutils/ld only appears when combined with bison 2.4.1.
> I don't see the issue on my x86 linux PC (I moved bison to 2.4.1 but the
> binutils build wouldn't break).
> > /bin/sh /Users/cerial/Workspace/cegcc/src/binutils/ld/../ylwrap /Users/
> > cerial/Workspace/cegcc/src/binutils/ld/deffilep.y y.tab.c deffilep.c
> > y.tab.h deffilep.h y.output deffilep.output -- bison -y -d
> > conflicts: 3 shift/reduce
> > updating deffilep.h
> > gcc -DHAVE_CONFIG_H -I. -I/Users/cerial/Workspace/cegcc/src/binutils/
> > ld -I. -I. -I/Users/cerial/Workspace/cegcc/src/binutils/ld -I../bfd -I/
> > Users/cerial/Workspace/cegcc/src/binutils/ld/../bfd -I/Users/cerial/
> > Workspace/cegcc/src/binutils/ld/../include -g -O2 -DLOCALEDIR="\"/opt/
> > cegcc/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-
> > prototypes -Werror -g -O2 -c deffilep.c -Wno-error
> > deffilep.c:204: error: syntax error before numeric constant
> > deffilep.c:233:1: warning: "STACKSIZE" redefined
> > In file included from /usr/include/machine/param.h:35,
> > from /usr/include/sys/param.h:110,
> > from /Users/cerial/Workspace/cegcc/src/binutils/ld/
> > sysdep.h:56,
> > from deffilep.y:23:
> > /usr/include/ppc/param.h:61:1: warning: this is the location of the
> > previous definition
> > >> +%token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATAU DATAL
I didn't recognize the significance of this earlier. If the token
STACKSIZE is conflicting with a system header in MacOS, perhaps a better
fix is to rename STACKSIZE in the .y and update any uses elsewhere. Have
you tried that yet?
Your current patch lets the system header symbol be redefined, and so
there should still be a warning even though the error goes away. I don't
know what the effect of redefining that header symbol is.
I'd say the backward incompatibility here is really in MacOS. Bison's
backward incompatibility just converted the important warning into an
error.