qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Hexagon (meson.build): define min bison version


From: Bastian Koppelmann
Subject: Re: [PATCH] Hexagon (meson.build): define min bison version
Date: Wed, 8 Feb 2023 09:53:07 +0100

Hi Phil,

On Tue, Feb 07, 2023 at 05:11:10PM +0100, Philippe Mathieu-Daudé wrote:
> +Bastian
> 
> On 7/2/23 16:08, Thomas Huth wrote:
> > 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-Summary.html#index-_0025define-parse_002eerror
> > > > 
> > > > Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> > > > ---
> > > >   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: ['@BASENAME@.tab.c', '@BASENAME@.tab.h'],
> > > >           arguments: ['@INPUT@', '--defines=@OUTPUT1@',
> > > > '--output=@OUTPUT0@']
> > > >       )
> > 
> > Looks reasonable, thus:
> > 
> > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > 
> > 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...
> 
> I suppose this fix the tricore container problem Peter reported last week:
> https://lore.kernel.org/qemu-devel/CAFEAcA-Vr8=br=9jGU1Tr=HTyH6o+S9H79oG=6BqZb8FSp+2Tw@mail.gmail.com/
> 
> https://gitlab.com/qemu-project/qemu/-/jobs/3710561054
> 
> #6 43.63 ldlex.l: In function 'yy_input':
> #6 43.63 ldlex.l:615:7: error: 'yy_current_buffer' undeclared (first
> use in this function); did you mean 'yy_create_buffer'?
> #6 43.63 {
> #6 43.63 ^
> #6 43.63 yy_create_buffer

Thanks, I think this would fix it. However, I want to include 
tricore-gcc/newlib to the
docker image and created a toolchain release for that, so that we don't have to
compile binutils/gcc/newlib ourself. So I don't think this is relevant for me
anymore.

Cheers,
Bastian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]