qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 21/26] configure, meson: move more compiler checks to Meson


From: Peter Maydell
Subject: Re: [PULL 21/26] configure, meson: move more compiler checks to Meson
Date: Mon, 15 Nov 2021 16:55:07 +0000

On Mon, 15 Nov 2021 at 16:36, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 14 Oct 2021 at 17:49, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Message-Id: <20211007130829.632254-15-pbonzini@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >  configure        | 91 ------------------------------------------------
> >  meson.build      | 44 +++++++++++++++++++++++
> >  util/meson.build |  4 ++-
> >  3 files changed, 47 insertions(+), 92 deletions(-)
>
>
> > diff --git a/meson.build b/meson.build
> > index 6bf43e6d30..6b7487b725 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -1550,6 +1550,8 @@ config_host_data.set('CONFIG_INOTIFY',
> >                       cc.has_header_symbol('sys/inotify.h', 'inotify_init'))
> >  config_host_data.set('CONFIG_INOTIFY1',
> >                       cc.has_header_symbol('sys/inotify.h', 
> > 'inotify_init1'))
> > +config_host_data.set('CONFIG_IOVEC',
> > +                     cc.has_header_symbol('sys/uio.h', 'struct iovec'))
> >  config_host_data.set('CONFIG_MACHINE_BSWAP_H',
> >                       cc.has_header_symbol('machine/bswap.h', 'bswap32',
> >                                            prefix: '''#include 
> > <sys/endian.h>
>
> Hi -- I've just noticed that this change breaks compilation for me,
> because this test incorrectly fails to set CONFIG_IOVEC on a system
> where the header defines 'struct iovec'.

That wasn't quite right. On further investigation, the problem is that
the meson tests silently misbehave if you included "-Werror" in your
--extra-cflags. This results in meson building all the tests with -Werror,
but meson's generated code for tests can't handle that. (configure
gets this right because it has code in that specifically checks
"does this test case give the same result for -Werror and not".)

-- PMM



reply via email to

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