Re: [libvirt PATCH] meson: Check usability of linux/kvm.h

2023-04-27 Thread Andrea Bolognani
On Thu, Apr 27, 2023 at 11:28:36AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 27, 2023 at 12:00:59PM +0200, Andrea Bolognani wrote: > > On Thu, Apr 27, 2023 at 11:50:05AM +0200, Michal Prívozník wrote: > > > But leaving meson aside, shouldn't we just use check_header() for every > > > header fi

Re: [libvirt PATCH] meson: Check usability of linux/kvm.h

2023-04-27 Thread Daniel P . Berrangé
On Thu, Apr 27, 2023 at 12:00:59PM +0200, Andrea Bolognani wrote: > On Thu, Apr 27, 2023 at 11:50:05AM +0200, Michal Prívozník wrote: > > On 4/27/23 11:41, Andrea Bolognani wrote: > > > +# headers for which we need to check actual usability. in most > > > +# cases, checking for presence is enough (

Re: [libvirt PATCH] meson: Check usability of linux/kvm.h

2023-04-27 Thread Andrea Bolognani
On Thu, Apr 27, 2023 at 11:50:05AM +0200, Michal Prívozník wrote: > On 4/27/23 11:41, Andrea Bolognani wrote: > > +# headers for which we need to check actual usability. in most > > +# cases, checking for presence is enough (and it's way faster) > > +check_headers = [ > > + 'linux/kvm.h', > > +] >

Re: [libvirt PATCH] meson: Check usability of linux/kvm.h

2023-04-27 Thread Michal Prívozník
On 4/27/23 11:41, Andrea Bolognani wrote: > This fixes cross-building in some scenarios. > > Specifically, when building for armv7l on x86_64, has_header() > will see the x86_64 version of the header and consider it usable. > Later, when an attempt is made to actually use it, the compiler > will q

[libvirt PATCH] meson: Check usability of linux/kvm.h

2023-04-27 Thread Andrea Bolognani
This fixes cross-building in some scenarios. Specifically, when building for armv7l on x86_64, has_header() will see the x86_64 version of the header and consider it usable. Later, when an attempt is made to actually use it, the compiler will quickly realize that things can't quite work. The reas