On Tue, 2009-04-28 at 14:46 -0400, Joel E. Denny wrote: > 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.
My compliments for reading this so thoroughly ! (not kidding !) You're right, the original issue was that STACKSIZE is getting defined twice, that's a MacOS change. The suggestion by H-P from the binutils list was to #undef STACKSIZE between the system includes and the (bison generated) definition. Thanks for all your input, I think the next question now is whether the binutils crew wants to see a fix like this coming. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison