Skip to contentSkip to conversation

configure: Restrict TCG to emulation

PATCH In review Thomas Huth 3 participants 3 messages Jul 6, 2022 – Jul 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Restrict TCG to emulation

From: Philippe Mathieu-Daudé <[email protected]>

If we don't need to emulate any target, we certainly don't need TCG.

This should also help to compile again with
".../configure --enable-tools --disable-system --disable-user"
on systems that do not have a TCG backend.

[thuth: Re-arranged the code, remove check-softfloat from buildtest.yml]
---
 configure                  | 20 ++++++++++++++------
 .gitlab-ci.d/buildtest.yml |  2 +-
 2 files changed, 15 insertions(+), 7 deletions(-)
configure +14 -6
index 76728b31f7..61bd807a47 100755
@@ -329,7 +329,7 @@ fi
 fdt="auto"
 
 # 2. Automatically enable/disable other options
-tcg="enabled"
+tcg="auto"
 cfi="false"
 
 # parse CC options second
@@ -1409,11 +1409,6 @@ EOF
   fi
 fi
 
-if test "$tcg" = "enabled"; then
-    git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
-    git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
-fi
-
 if test -z "${target_list+xxx}" ; then
     default_targets=yes
     for target in $default_target_list; do
@@ -1444,6 +1439,19 @@ case " $target_list " in
   ;;
 esac
 
+if test "$tcg" = "auto"; then
+  if test -z "$target_list"; then
+    tcg="disabled"
+  else
+    tcg="enabled"
+  fi
+fi
+
+if test "$tcg" = "enabled"; then
+    git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
+    git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
+fi
+
 feature_not_found() {
   feature=$1
   remedy=$2
.gitlab-ci.d/buildtest.yml +1 -1
index 8a4353ef93..1931b77b49 100644
@@ -599,7 +599,7 @@ build-tools-and-docs-debian:
     optional: true
   variables:
     IMAGE: debian-amd64
-    MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
+    MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
     QEMU_JOB_PUBLISH: 1
   artifacts:
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Thomas Huth

From: Philippe Mathieu-Daudé<[email protected]>

If we don't need to emulate any target, we certainly don't need TCG.

This should also help to compile again with
".../configure --enable-tools --disable-system --disable-user"
on systems that do not have a TCG backend.

Quoted 7 lines
[thuth: Re-arranged the code, remove check-softfloat from buildtest.yml]
---
  configure                  | 20 ++++++++++++++------
  .gitlab-ci.d/buildtest.yml |  2 +-
  2 files changed, 15 insertions(+), 7 deletions(-)

r~

#2 lore raw
In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

If we don't need to emulate any target, we certainly don't need TCG.

This should also help to compile again with
".../configure --enable-tools --disable-system --disable-user"
on systems that do not have a TCG backend.

Quoted 7 lines
[thuth: Re-arranged the code, remove check-softfloat from buildtest.yml]
---
  configure                  | 20 ++++++++++++++------
  .gitlab-ci.d/buildtest.yml |  2 +-
  2 files changed, 15 insertions(+), 7 deletions(-)

Thanks for re-spinning! Queued via mips-next.