diff mbox series

[1/4] configure: Restrict TCG to emulation

Message ID 20220204152924.6253-2-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series buildsys: Avoid building unused objects | expand

Commit Message

Philippe Mathieu-Daudé Feb. 4, 2022, 3:29 p.m. UTC
If we don't need to emulate any target, we certainly don't need TCG.

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

Comments

Thomas Huth Feb. 4, 2022, 3:35 p.m. UTC | #1
On 04/02/2022 16.29, Philippe Mathieu-Daudé wrote:
> If we don't need to emulate any target, we certainly don't need TCG.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   configure | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 9f40d60196..4002f81ac9 100755
> --- a/configure
> +++ b/configure
> @@ -370,7 +370,7 @@ slirp="auto"
>   default_devices="true"
>   
>   # 3. Automatically enable/disable other options
> -tcg="enabled"
> +tcg="auto"
>   cfi="false"
>   
>   # 4. Detection partly done in configure
> @@ -1777,7 +1777,7 @@ EOF
>     fi
>   fi
>   
> -if test "$tcg" = "enabled"; then
> +if test "$tcg" != "disabled"; then
>       git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
>       git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
>   fi
> @@ -1819,6 +1819,14 @@ case " $target_list " in
>     ;;
>   esac
>   
> +if test "$tcg" = "auto"; then
> +  if test -z "$target_list"; then
> +    tcg="disabled"
> +  else
> +    tcg="enabled"
> +  fi
> +fi
> +
>   feature_not_found() {
>     feature=$1
>     remedy=$2

Reviewed-by: Thomas Huth <thuth@redhat.com>
Paolo Bonzini Feb. 4, 2022, 4:55 p.m. UTC | #2
On 2/4/22 16:29, Philippe Mathieu-Daudé via wrote:
> If we don't need to emulate any target, we certainly don't need TCG.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   configure | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 9f40d60196..4002f81ac9 100755
> --- a/configure
> +++ b/configure
> @@ -370,7 +370,7 @@ slirp="auto"
>   default_devices="true"
>   
>   # 3. Automatically enable/disable other options
> -tcg="enabled"
> +tcg="auto"
>   cfi="false"
>   
>   # 4. Detection partly done in configure
> @@ -1777,7 +1777,7 @@ EOF
>     fi
>   fi
>   
> -if test "$tcg" = "enabled"; then
> +if test "$tcg" != "disabled"; then
>       git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
>       git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
>   fi

This should be in patch 2, and it should at the same time move this "if" 
after auto is changed to "disabled/enabled" below.

Paolo

> @@ -1819,6 +1819,14 @@ case " $target_list " in
>     ;;
>   esac
>   
> +if test "$tcg" = "auto"; then
> +  if test -z "$target_list"; then
> +    tcg="disabled"
> +  else
> +    tcg="enabled"
> +  fi
> +fi

>   feature_not_found() {
>     feature=$1
>     remedy=$2
diff mbox series

Patch

diff --git a/configure b/configure
index 9f40d60196..4002f81ac9 100755
--- a/configure
+++ b/configure
@@ -370,7 +370,7 @@  slirp="auto"
 default_devices="true"
 
 # 3. Automatically enable/disable other options
-tcg="enabled"
+tcg="auto"
 cfi="false"
 
 # 4. Detection partly done in configure
@@ -1777,7 +1777,7 @@  EOF
   fi
 fi
 
-if test "$tcg" = "enabled"; then
+if test "$tcg" != "disabled"; then
     git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
     git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
 fi
@@ -1819,6 +1819,14 @@  case " $target_list " in
   ;;
 esac
 
+if test "$tcg" = "auto"; then
+  if test -z "$target_list"; then
+    tcg="disabled"
+  else
+    tcg="enabled"
+  fi
+fi
+
 feature_not_found() {
   feature=$1
   remedy=$2