Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-26 Thread Peter Maydell
On Tue, 26 Jan 2021 at 00:12, Joelle van Dyne wrote: > cc.compiles should work though. Is there a reason why it's not used > instead of all the compile_prog checks in ./configure ? As Paolo says, that's because our transition to Meson is pretty recent. We put in the minimum necessary to move all

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-25 Thread Paolo Bonzini
On 26/01/21 01:12, Joelle van Dyne wrote: Here's how meson does cc.has_function https://github.com/mesonbuild/meson/blob/master/mesonbuild/compilers/mixins/clike.py#L761 Since the compiler error comes from the header file with __attribute__((availability(ios,unavailable))) The meson check wil

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-25 Thread Joelle van Dyne
Here's how meson does cc.has_function https://github.com/mesonbuild/meson/blob/master/mesonbuild/compilers/mixins/clike.py#L761 Since the compiler error comes from the header file with __attribute__((availability(ios,unavailable))) The meson check will always pass. cc.compiles should work thou

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-25 Thread Paolo Bonzini
On 23/01/21 14:45, Peter Maydell wrote: On Sat, 23 Jan 2021 at 03:18, Joelle van Dyne wrote: On Fri, Jan 22, 2021 at 3:17 PM Peter Maydell wrote: Can we do the "does system() exist?" check in meson.build ? config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system')) Unfortunat

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-23 Thread Peter Maydell
On Sat, 23 Jan 2021 at 03:18, Joelle van Dyne wrote: On Fri, Jan 22, 2021 at 3:17 PM Peter Maydell wrote: >> Can we do the "does system() exist?" check in meson.build ? >> config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system')) > Unfortunately, this doesn't work for iOS, which d

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-22 Thread Joelle van Dyne
Unfortunately, this doesn't work for iOS, which defines system() but throws a compile time error if you try to call it. -j On Fri, Jan 22, 2021 at 3:17 PM Peter Maydell wrote: > > On Fri, 22 Jan 2021 at 23:12, Peter Maydell wrote: > > > > On Fri, 22 Jan 2021 at 20:13, Joelle van Dyne wrote: >

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-22 Thread Peter Maydell
On Fri, 22 Jan 2021 at 23:12, Peter Maydell wrote: > > On Fri, 22 Jan 2021 at 20:13, Joelle van Dyne wrote: > > > > Build without error on hosts without a working system(). An assertion > > will trigger if system() is called. > > > > Signed-off-by: Joelle van Dyne > > configure| 19

Re: [PATCH v7 05/11] osdep: build with non-working system() function

2021-01-22 Thread Peter Maydell
On Fri, 22 Jan 2021 at 20:13, Joelle van Dyne wrote: > > Build without error on hosts without a working system(). An assertion > will trigger if system() is called. > > Signed-off-by: Joelle van Dyne configure| 19 +++ Can we do the "does system() exist?" check in me

[PATCH v7 05/11] osdep: build with non-working system() function

2021-01-22 Thread Joelle van Dyne
Build without error on hosts without a working system(). An assertion will trigger if system() is called. Signed-off-by: Joelle van Dyne --- configure| 19 +++ include/qemu/osdep.h | 11 +++ 2 files changed, 30 insertions(+) diff --git a/configure b/configure