[PATCH v3] configure: Avoid compiling system tools on user build by default

Philippe Mathieu-Daudé posted 1 patch 5 years, 9 months ago
Test docker-quick@centos7 passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200217133327.25144-1-f4bug@amsat.org
configure | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
[PATCH v3] configure: Avoid compiling system tools on user build by default
Posted by Philippe Mathieu-Daudé 5 years, 9 months ago
User-mode does not need the system tools. Do not build them by
default if the user specifies --disable-system.

This disables building the following binaries on a user-only build:

- elf2dmp
- qemu-edid
- qemu-ga
- qemu-img
- qemu-io
- qemu-nbd
- ivshmem-client
- ivshmem-server

The qemu-user binaries are not affected by this change.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v3:
- fixed typos (Aleksandar)
v2:
- use simpler if/else statement (therefore not adding Richard R-b)
- improved description (Aleksandar)
---
 configure | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 6f5d850949..efe00dd497 100755
--- a/configure
+++ b/configure
@@ -455,7 +455,7 @@ guest_agent_ntddscsi="no"
 guest_agent_msi=""
 vss_win32_sdk=""
 win_sdk="no"
-want_tools="yes"
+want_tools=""
 libiscsi=""
 libnfs=""
 coroutine=""
@@ -2213,6 +2213,16 @@ else
     echo big/little test failed
 fi
 
+##########################################
+# system tools
+if test -z "$want_tools"; then
+    if test "$softmmu" = "no"; then
+        want_tools=no
+    else
+        want_tools=yes
+    fi
+fi
+
 ##########################################
 # cocoa implies not SDL or GTK
 # (the cocoa UI code currently assumes it is always the active UI
-- 
2.21.1


Re: [PATCH v3] configure: Avoid compiling system tools on user build by default
Posted by Philippe Mathieu-Daudé 5 years, 9 months ago
On Mon, Feb 17, 2020 at 2:33 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> User-mode does not need the system tools. Do not build them by
> default if the user specifies --disable-system.
>
> This disables building the following binaries on a user-only build:
>
> - elf2dmp
> - qemu-edid
> - qemu-ga
> - qemu-img
> - qemu-io
> - qemu-nbd
> - ivshmem-client
> - ivshmem-server
>
> The qemu-user binaries are not affected by this change.
>

I forgot to add:
Reviewed-by: Laurent Vivier <laurent@vivier.eu>

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> v3:
> - fixed typos (Aleksandar)
> v2:
> - use simpler if/else statement (therefore not adding Richard R-b)
> - improved description (Aleksandar)
> ---
>  configure | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 6f5d850949..efe00dd497 100755
> --- a/configure
> +++ b/configure
> @@ -455,7 +455,7 @@ guest_agent_ntddscsi="no"
>  guest_agent_msi=""
>  vss_win32_sdk=""
>  win_sdk="no"
> -want_tools="yes"
> +want_tools=""
>  libiscsi=""
>  libnfs=""
>  coroutine=""
> @@ -2213,6 +2213,16 @@ else
>      echo big/little test failed
>  fi
>
> +##########################################
> +# system tools
> +if test -z "$want_tools"; then
> +    if test "$softmmu" = "no"; then
> +        want_tools=no
> +    else
> +        want_tools=yes
> +    fi
> +fi
> +
>  ##########################################
>  # cocoa implies not SDL or GTK
>  # (the cocoa UI code currently assumes it is always the active UI
> --
> 2.21.1
>

Re: [PATCH v3] configure: Avoid compiling system tools on user build by default
Posted by Laurent Vivier 5 years, 8 months ago
Le 17/02/2020 à 14:33, Philippe Mathieu-Daudé a écrit :
> User-mode does not need the system tools. Do not build them by
> default if the user specifies --disable-system.
> 
> This disables building the following binaries on a user-only build:
> 
> - elf2dmp
> - qemu-edid
> - qemu-ga
> - qemu-img
> - qemu-io
> - qemu-nbd
> - ivshmem-client
> - ivshmem-server
> 
> The qemu-user binaries are not affected by this change.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> v3:
> - fixed typos (Aleksandar)
> v2:
> - use simpler if/else statement (therefore not adding Richard R-b)
> - improved description (Aleksandar)
> ---
>  configure | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 6f5d850949..efe00dd497 100755
> --- a/configure
> +++ b/configure
> @@ -455,7 +455,7 @@ guest_agent_ntddscsi="no"
>  guest_agent_msi=""
>  vss_win32_sdk=""
>  win_sdk="no"
> -want_tools="yes"
> +want_tools=""
>  libiscsi=""
>  libnfs=""
>  coroutine=""
> @@ -2213,6 +2213,16 @@ else
>      echo big/little test failed
>  fi
>  
> +##########################################
> +# system tools
> +if test -z "$want_tools"; then
> +    if test "$softmmu" = "no"; then
> +        want_tools=no
> +    else
> +        want_tools=yes
> +    fi
> +fi
> +
>  ##########################################
>  # cocoa implies not SDL or GTK
>  # (the cocoa UI code currently assumes it is always the active UI
> 

Applied to my linux-user branch.

Thanks,
Laurent