On Tue, Apr 28, 2009 at 08:55:56PM +0200, Danny Backx wrote: > > > > 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 > Thanks for all your input, I think the next question now is whether the > binutils crew wants to see a fix like this coming.
This should fix the problem. We add _K for quite a few tokens in ldgram.y, for exactly the same reason. Committed. * deffilep.y (STACKSIZE_K): Rename from STACKSIZE. Index: ld/deffilep.y =================================================================== RCS file: /cvs/src/src/ld/deffilep.y,v retrieving revision 1.24 diff -u -p -r1.24 deffilep.y --- ld/deffilep.y 6 Jul 2007 14:09:41 -0000 1.24 +++ ld/deffilep.y 29 Apr 2009 01:12:51 -0000 @@ -104,7 +104,7 @@ static const char *lex_parse_string_end int number; }; -%token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATAU DATAL +%token NAME LIBRARY DESCRIPTION STACKSIZE_K HEAPSIZE CODE DATAU DATAL %token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANTU CONSTANTL %token PRIVATEU PRIVATEL %token READ WRITE EXECUTE SHARED NONAMEU NONAMEL DIRECTIVE @@ -124,7 +124,7 @@ command: NAME opt_name opt_base { def_image_name ($2, $3, 0); } | LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); } | DESCRIPTION ID { def_description ($2);} - | STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);} + | STACKSIZE_K NUMBER opt_number { def_stacksize ($2, $3);} | HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);} | CODE attr_list { def_section ("CODE", $2);} | DATAU attr_list { def_section ("DATA", $2);} @@ -570,7 +570,7 @@ struct diropts[] = { { "-heap", HEAPSIZE }, - { "-stack", STACKSIZE }, + { "-stack", STACKSIZE_K }, { "-attr", SECTIONS }, { "-export", EXPORTS }, { 0, 0 } @@ -894,7 +894,7 @@ tokens[] = { "SECTIONS", SECTIONS }, { "SEGMENTS", SECTIONS }, { "SHARED", SHARED }, - { "STACKSIZE", STACKSIZE }, + { "STACKSIZE", STACKSIZE_K }, { "VERSION", VERSIONK }, { "WRITE", WRITE }, { 0, 0 } -- Alan Modra Australia Development Lab, IBM _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison