> -----Original Message-----
> From: Thomas Huth <[email protected]>
> Sent: Tuesday, February 7, 2023 9:08 AM
> To: Philippe Mathieu-Daudé <[email protected]>; Matheus Bernardino
> (QUIC) <[email protected]>; [email protected]
> Cc: [email protected]; Taylor Simpson <[email protected]>; Brian Cain
> <[email protected]>; Antonio Caggiano (QUIC)
> <[email protected]>; Daniel P. Berrangé <[email protected]>;
> Paolo Bonzini <[email protected]>; QEMU Trivial <qemu-
> [email protected]>
> Subject: Re: [PATCH] Hexagon (meson.build): define min bison version
> 
> On 07/02/2023 15.54, Philippe Mathieu-Daudé wrote:
> > Cc'ing Paolo/Daniel/Thomas
> >
> > On 7/2/23 15:52, Matheus Tavares Bernardino wrote:
> >> Hexagon's idef-parser machinery uses some bison features that are not
> >> available at older versions. The most preeminent example (as it can
> >> be used as a sentinel) is "%define parse.error verbose". This was
> >> introduced in version 3.0 of the tool, which is able to compile
> >> qemu-hexagon just fine. However, compilation fails with the previous
> >> minor bison release, v2.7. So let's assert the minimum version at
> >> meson.build to give a more comprehensive error message for those
> >> trying to compile QEMU.
> >>
> >> [1]:
> >> https://www.gnu.org/software/bison/manual/html_node/_0025define-
> Summa
> >> ry.html#index-_0025define-parse_002eerror
> >>
> >>
> >> Signed-off-by: Matheus Tavares Bernardino
> <[email protected]>
> >> ---
> >>   target/hexagon/meson.build | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
> >> index c9d31d095c..42b03c81e6 100644
> >> --- a/target/hexagon/meson.build
> >> +++ b/target/hexagon/meson.build
> >> @@ -183,7 +183,7 @@ if idef_parser_enabled and 'hexagon-linux-user'
> >> in target_dirs
> >>       )
> >>       bison = generator(
> >> -        find_program('bison'),
> >> +        find_program('bison', version: '>=3.0'),
> >>           output: ['@[email protected]', '@[email protected]'],
> >>           arguments: ['@INPUT@', '--defines=@OUTPUT1@', '--
> output=@OUTPUT0@']
> >>       )
> 
> Looks reasonable, thus:
> 
> Reviewed-by: Thomas Huth <[email protected]>
> 
> Out of curiosity: Where did you encounter this problem? After having a quick
> look at https://repology.org/project/bison/versions it seems to me that all
> our supported OS distros should already ship bison 3.0 or newer...
> 
>   Thomas

CC'ing Alessandro

Reviewed-by: Taylor Simpson <[email protected]>

Reply via email to