* [PATCH] configure: do not limit Hypervisor.framework test to Darwin
@ 2020-09-16 8:11 Paolo Bonzini
2020-09-16 15:42 ` Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-09-16 8:11 UTC (permalink / raw
To: qemu-devel; +Cc: Christophe de Dinechin, r.bolshakov
Because the target/i386/hvf/meson.build rule culls hvf support
on non-Darwin systems, a --enable-hvf build is succeeding.
To fix this, just try the compilation test every time someone
passes --enable-hvf.
Reported-by: Christophe de Dinechin <dinechin@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index b4c0e0d07c..14b06a2510 100755
--- a/configure
+++ b/configure
@@ -863,7 +863,7 @@ Darwin)
bsd="yes"
darwin="yes"
hax="yes"
- hvf="yes"
+ hvf=""
if [ "$cpu" = "x86_64" ] ; then
QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS"
@@ -5867,16 +5867,18 @@ fi
#################################################
# Check to see if we have the Hypervisor framework
-if [ "$darwin" = "yes" ] ; then
+if [ "$hvf" != "no" ] ; then
cat > $TMPC << EOF
#include <Hypervisor/hv.h>
int main() { return 0;}
EOF
if ! compile_object ""; then
+ if test "$hvf" = "yes"; then
+ error_exit "Hypervisor.framework not available"
+ fi
hvf='no'
else
hvf='yes'
- QEMU_LDFLAGS="-framework Hypervisor $QEMU_LDFLAGS"
fi
fi
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] configure: do not limit Hypervisor.framework test to Darwin
2020-09-16 8:11 [PATCH] configure: do not limit Hypervisor.framework test to Darwin Paolo Bonzini
@ 2020-09-16 15:42 ` Richard Henderson
2020-09-17 17:27 ` Roman Bolshakov
2020-09-17 17:51 ` Roman Bolshakov
2 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2020-09-16 15:42 UTC (permalink / raw
To: Paolo Bonzini, qemu-devel; +Cc: Christophe de Dinechin, r.bolshakov
On 9/16/20 1:11 AM, Paolo Bonzini wrote:
> Because the target/i386/hvf/meson.build rule culls hvf support
> on non-Darwin systems, a --enable-hvf build is succeeding.
> To fix this, just try the compilation test every time someone
> passes --enable-hvf.
>
> Reported-by: Christophe de Dinechin <dinechin@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] configure: do not limit Hypervisor.framework test to Darwin
2020-09-16 8:11 [PATCH] configure: do not limit Hypervisor.framework test to Darwin Paolo Bonzini
2020-09-16 15:42 ` Richard Henderson
@ 2020-09-17 17:27 ` Roman Bolshakov
2020-09-17 17:51 ` Roman Bolshakov
2 siblings, 0 replies; 5+ messages in thread
From: Roman Bolshakov @ 2020-09-17 17:27 UTC (permalink / raw
To: Paolo Bonzini; +Cc: Christophe de Dinechin, qemu-devel
On Wed, Sep 16, 2020 at 04:11:31AM -0400, Paolo Bonzini wrote:
> Because the target/i386/hvf/meson.build rule culls hvf support
> on non-Darwin systems, a --enable-hvf build is succeeding.
> To fix this, just try the compilation test every time someone
> passes --enable-hvf.
>
> Reported-by: Christophe de Dinechin <dinechin@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index b4c0e0d07c..14b06a2510 100755
> --- a/configure
> +++ b/configure
> @@ -863,7 +863,7 @@ Darwin)
> bsd="yes"
> darwin="yes"
> hax="yes"
> - hvf="yes"
> + hvf=""
> if [ "$cpu" = "x86_64" ] ; then
> QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
> QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS"
> @@ -5867,16 +5867,18 @@ fi
>
> #################################################
> # Check to see if we have the Hypervisor framework
> -if [ "$darwin" = "yes" ] ; then
> +if [ "$hvf" != "no" ] ; then
> cat > $TMPC << EOF
> #include <Hypervisor/hv.h>
> int main() { return 0;}
> EOF
> if ! compile_object ""; then
> + if test "$hvf" = "yes"; then
> + error_exit "Hypervisor.framework not available"
> + fi
> hvf='no'
> else
> hvf='yes'
> - QEMU_LDFLAGS="-framework Hypervisor $QEMU_LDFLAGS"
> fi
> fi
>
> --
> 2.26.2
>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Tested-by: Roman Bolshakov <r.bolshakov@yadro.com>
Thanks,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] configure: do not limit Hypervisor.framework test to Darwin
2020-09-16 8:11 [PATCH] configure: do not limit Hypervisor.framework test to Darwin Paolo Bonzini
2020-09-16 15:42 ` Richard Henderson
2020-09-17 17:27 ` Roman Bolshakov
@ 2020-09-17 17:51 ` Roman Bolshakov
2020-09-18 8:42 ` Paolo Bonzini
2 siblings, 1 reply; 5+ messages in thread
From: Roman Bolshakov @ 2020-09-17 17:51 UTC (permalink / raw
To: Paolo Bonzini; +Cc: Christophe de Dinechin, qemu-devel
On Wed, Sep 16, 2020 at 04:11:31AM -0400, Paolo Bonzini wrote:
> Because the target/i386/hvf/meson.build rule culls hvf support
> on non-Darwin systems, a --enable-hvf build is succeeding.
> To fix this, just try the compilation test every time someone
> passes --enable-hvf.
>
> Reported-by: Christophe de Dinechin <dinechin@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index b4c0e0d07c..14b06a2510 100755
> --- a/configure
> +++ b/configure
> @@ -863,7 +863,7 @@ Darwin)
> bsd="yes"
> darwin="yes"
> hax="yes"
> - hvf="yes"
> + hvf=""
> if [ "$cpu" = "x86_64" ] ; then
> QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
> QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS"
> @@ -5867,16 +5867,18 @@ fi
>
> #################################################
> # Check to see if we have the Hypervisor framework
> -if [ "$darwin" = "yes" ] ; then
> +if [ "$hvf" != "no" ] ; then
> cat > $TMPC << EOF
> #include <Hypervisor/hv.h>
> int main() { return 0;}
> EOF
> if ! compile_object ""; then
> + if test "$hvf" = "yes"; then
> + error_exit "Hypervisor.framework not available"
> + fi
> hvf='no'
> else
> hvf='yes'
> - QEMU_LDFLAGS="-framework Hypervisor $QEMU_LDFLAGS"
> fi
> fi
>
> --
> 2.26.2
>
After reading "configure: move cocoa option to Meson", I think the patch
should follow meson-driven configuration like the cocoa patch. That'd be
a step closer to make configure a thin shim to "meson configure".
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] configure: do not limit Hypervisor.framework test to Darwin
2020-09-17 17:51 ` Roman Bolshakov
@ 2020-09-18 8:42 ` Paolo Bonzini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-09-18 8:42 UTC (permalink / raw
To: Roman Bolshakov; +Cc: Christophe de Dinechin, qemu-devel
On 17/09/20 19:51, Roman Bolshakov wrote:
> On Wed, Sep 16, 2020 at 04:11:31AM -0400, Paolo Bonzini wrote:
>> Because the target/i386/hvf/meson.build rule culls hvf support
>> on non-Darwin systems, a --enable-hvf build is succeeding.
>> To fix this, just try the compilation test every time someone
>> passes --enable-hvf.
>>
>> Reported-by: Christophe de Dinechin <dinechin@redhat.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> configure | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index b4c0e0d07c..14b06a2510 100755
>> --- a/configure
>> +++ b/configure
>> @@ -863,7 +863,7 @@ Darwin)
>> bsd="yes"
>> darwin="yes"
>> hax="yes"
>> - hvf="yes"
>> + hvf=""
>> if [ "$cpu" = "x86_64" ] ; then
>> QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
>> QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS"
>> @@ -5867,16 +5867,18 @@ fi
>>
>> #################################################
>> # Check to see if we have the Hypervisor framework
>> -if [ "$darwin" = "yes" ] ; then
>> +if [ "$hvf" != "no" ] ; then
>> cat > $TMPC << EOF
>> #include <Hypervisor/hv.h>
>> int main() { return 0;}
>> EOF
>> if ! compile_object ""; then
>> + if test "$hvf" = "yes"; then
>> + error_exit "Hypervisor.framework not available"
>> + fi
>> hvf='no'
>> else
>> hvf='yes'
>> - QEMU_LDFLAGS="-framework Hypervisor $QEMU_LDFLAGS"
>> fi
>> fi
>>
>> --
>> 2.26.2
>>
>
> After reading "configure: move cocoa option to Meson", I think the patch
> should follow meson-driven configuration like the cocoa patch. That'd be
> a step closer to make configure a thin shim to "meson configure".
That's unfortunately not yet possible because supported_hvf_target()
uses $hvf. The idea is to move accelerator detection to meson so that
config-target.mak becomes essentially constant and could for example be
moved to default-configs/.
Paolo
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-18 8:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 8:11 [PATCH] configure: do not limit Hypervisor.framework test to Darwin Paolo Bonzini
2020-09-16 15:42 ` Richard Henderson
2020-09-17 17:27 ` Roman Bolshakov
2020-09-17 17:51 ` Roman Bolshakov
2020-09-18 8:42 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.