[PATCH] configure: Only build s390-ccw BIOS for system emulation

Philippe Mathieu-Daudé posted 1 patch 3 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210124161740.2502786-1-f4bug@amsat.org
Maintainers: Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>
There is a newer version of this series
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] configure: Only build s390-ccw BIOS for system emulation
Posted by Philippe Mathieu-Daudé 3 years, 3 months ago
It is pointless to build the s390-ccw BIOS when only user-mode
emulation is built. Only build it when system mode emulation is
selected.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 6f6a319c2f6..d5e97ff2d52 100755
--- a/configure
+++ b/configure
@@ -5453,7 +5453,7 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
 fi
 
 # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900
-if test "$cpu" = "s390x" ; then
+if test "$cpu" = "s390x" && test "$softmmu" = yes; then
   write_c_skeleton
   if compile_prog "-march=z900" ""; then
     roms="$roms s390-ccw"
-- 
2.26.2

Re: [PATCH] configure: Only build s390-ccw BIOS for system emulation
Posted by Thomas Huth 3 years, 3 months ago
On 24/01/2021 17.17, Philippe Mathieu-Daudé wrote:
> It is pointless to build the s390-ccw BIOS when only user-mode
> emulation is built. Only build it when system mode emulation is
> selected.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 6f6a319c2f6..d5e97ff2d52 100755
> --- a/configure
> +++ b/configure
> @@ -5453,7 +5453,7 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
>   fi
>   
>   # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900
> -if test "$cpu" = "s390x" ; then
> +if test "$cpu" = "s390x" && test "$softmmu" = yes; then

Actually, you could even improve by checking whether we're building the 
s390x-softmmu target (the bios is also not required if we're just building 
the x86_64-softmmu target on a s390x host, for example).

  Thomas