[PATCH 1/4] configure: Restrict TCG to emulation

Philippe Mathieu-Daudé via posted 4 patches 4 years ago
[PATCH 1/4] configure: Restrict TCG to emulation
Posted by Philippe Mathieu-Daudé via 4 years ago
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
-- 
2.34.1


Re: [PATCH 1/4] configure: Restrict TCG to emulation
Posted by Thomas Huth 4 years ago
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>


Re: [PATCH 1/4] configure: Restrict TCG to emulation
Posted by Paolo Bonzini 4 years ago
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