[coreboot] [PATCH] Fix a build error when using bison-2.4

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Nov 12 18:01:27 CET 2008


On 12.11.2008 17:28, Mart Raudsepp wrote:
> This fixes one of the errors from using bison-2.4, but there are more.
>
> This one in details is the following error:
>
>   BISON   build/util/dtc/dtc-parser.tab.c
>   HOSTCC  build/util/dtc/dtc-parser.tab.o
> /home/leio/dev/coreboot-v3/util/dtc/dtc-parser.y: In function ‘yyuserAction’:
> /home/leio/dev/coreboot-v3/util/dtc/dtc-parser.y:154: error: expected ‘;’ before ‘}’ token
> make: *** [/home/leio/dev/coreboot-v3/build/util/dtc/dtc-parser.tab.o] Error 1
>
> Note that 2.4.1 might be made to still work without the semi-colon for some languages, but I
> understand 2.5 then still won't work without one. As it builds fine with this change with
> bison-2.3, it should be safe to just add the semicolon.
>
> The remaining error is the following:
>
> /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l: In function ‘yylex’:
> /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: ‘yylval’ undeclared (first use in this function)
> /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: (Each undeclared identifier is reported only once
> /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: for each function it appears in.)
>
> dtc-parser.tab.h doesn't seem to get an "extern YYSTYPE yylval" declaration, which per documentation should
> only happen for pure parser cases ("%define api.pure"), but I can't find any such declaration in dtc to cause
> the problem.
>
> Note that upstream dtc builds fine with bison-2.4
>   

We need to investigate whether switching to a newer upstream dtc would
be worthwhile. Our version is quite old and has seen coreboot-specific
changes over time.

> Signed-off-by: Mart Raudsepp <mart.raudsepp at artecdesign.ee>
>   

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the coreboot mailing list