Commit 7e90d6e9ee for qemu.org
commit 7e90d6e9ee15bc07f487146c19c4b98c50cb1f73
Author: Alex Bennée <alex.bennee@linaro.org>
Date: Thu Sep 17 17:55:48 2026 +0100
configure: re-purpose the tcg test compiler configs for vdso building
All the tcg tests are in meson now so there is no reason to put the
config-target.mak files in those directories. We also don't need the
GDB feature tests or to emit prerequsistes.
The vdso re-build blob does use the compiler definitions though so
we can emit the details for that and tweak the vdso makefiles to point
at the right place. Note some of the vdso makefiles build both 32 and
64 bit versions from the same compiler.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260917165602.3405537-5-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
diff --git a/configure b/configure
index 04e312a111..667fc7ca19 100755
--- a/configure
+++ b/configure
@@ -1732,65 +1732,48 @@ if test "$default_targets" = "yes"; then
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
fi
-tcg_tests_with_compilers=
+# Export the compiler details needed for rebuilding the vdso blobs
for target in $target_list; do
- arch=${target%%-*}
+ # Skip anything that is not a linux-user target
case $target in
+ *-linux-user)
+ ;;
+ *)
+ continue
+ ;;
+ esac
+
+ arch=${target%%-*}
+
+ case $arch in
xtensa*-linux-user)
- # the toolchain is not complete with headers, only build system tests
+ # the toolchain can only build system tests due to missing headers
+ continue
+ ;;
+ aarch64_be-linux-user)
+ # there is no BE user space
continue
;;
- *-softmmu)
- test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
- qemu="qemu-system-$arch"
+ aarch64|arm|hppa|i386|loongarch64|ppc64|riscv64|s390x|sh4|x86_64)
+ # arches which need a vdso, some 64 bit arches build both
;;
- *-linux-user|*-bsd-user)
- qemu="qemu-$arch"
+ *)
+ continue
;;
esac
- if probe_target_compiler $target || test -n "$container_image"; then
- test -n "$container_image" && build_static=y
- mkdir -p "tests/tcg/$target"
- config_target_mak=tests/tcg/$target/config-target.mak
- ln -sf "$source_path/tests/tcg/Makefile.target" "tests/tcg/$target/Makefile"
+ # note container_image is set by a successful call to probe_target_compiler
+ if probe_target_compiler "$target" || test -n "$container_image"; then
+ mkdir -p "linux-user/$arch"
+ config_target_mak=linux-user/$arch/config-target.mak
echo "# Automatically generated by configure - do not modify" > "$config_target_mak"
echo "TARGET_NAME=$arch" >> "$config_target_mak"
echo "TARGET=$target" >> "$config_target_mak"
- write_target_makefile "build-tcg-tests-$target" >> "$config_target_mak"
- echo "BUILD_STATIC=$build_static" >> "$config_target_mak"
- echo "QEMU=$PWD/$qemu" >> "$config_target_mak"
-
- # will GDB work with these binaries?
- if test "${gdb_arches#*$arch}" != "$gdb_arches"; then
- echo "GDB=$gdb_bin" >> $config_target_mak
- fi
-
- if test "${gdb_arches#*$arch}" != "$gdb_arches" && version_ge $gdb_version 14.1; then
- echo "GDB_HAS_SME_TILES=y" >> $config_target_mak
- else
- echo "GDB_HAS_SME_TILES=n" >> $config_target_mak
- fi
-
- if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.1; then
- echo "GDB_HAS_MTE=y" >> $config_target_mak
- fi
-
- if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 16.0; then
- # GDB has to support MTE in baremetal to allow debugging MTE in QEMU system mode
- echo "GDB_SUPPORTS_MTE_IN_BAREMETAL=y" >> $config_target_mak
- fi
-
- echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
- tcg_tests_with_compilers="$tcg_tests_with_compilers $target"
+ write_target_makefile "update-linux-vdso" >> "$config_target_mak"
fi
done
-if test "$tcg" = "enabled"; then
- echo "TCG_TESTS_WITH_COMPILERS=$tcg_tests_with_compilers" >> $config_host_mak
-fi
-
if test "$skip_meson" = no; then
cross="config-meson.cross.new"
meson_quote() {
diff --git a/linux-user/aarch64/Makefile.vdso b/linux-user/aarch64/Makefile.vdso
index c33a679c0f..82ed201108 100644
--- a/linux-user/aarch64/Makefile.vdso
+++ b/linux-user/aarch64/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/aarch64-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/aarch64/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/aarch64
VPATH += $(SUBDIR)
diff --git a/linux-user/arm/Makefile.vdso b/linux-user/arm/Makefile.vdso
index ede489e236..16ae8d7aaa 100644
--- a/linux-user/arm/Makefile.vdso
+++ b/linux-user/arm/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/arm-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/arm/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/arm
VPATH += $(SUBDIR)
diff --git a/linux-user/hppa/Makefile.vdso b/linux-user/hppa/Makefile.vdso
index f4537ae716..78642c4266 100644
--- a/linux-user/hppa/Makefile.vdso
+++ b/linux-user/hppa/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/hppa-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/hppa/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/hppa
VPATH += $(SUBDIR)
diff --git a/linux-user/i386/Makefile.vdso b/linux-user/i386/Makefile.vdso
index 95bc616f6d..ca2e37fa6b 100644
--- a/linux-user/i386/Makefile.vdso
+++ b/linux-user/i386/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/i386-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/i386/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/i386
VPATH += $(SUBDIR)
diff --git a/linux-user/loongarch64/Makefile.vdso b/linux-user/loongarch64/Makefile.vdso
index 1d760b1e47..ceb6110120 100644
--- a/linux-user/loongarch64/Makefile.vdso
+++ b/linux-user/loongarch64/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/loongarch64-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/loongarch64/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/loongarch64
VPATH += $(SUBDIR)
diff --git a/linux-user/ppc/Makefile.vdso b/linux-user/ppc/Makefile.vdso
index e2b8facbb5..6b9be84381 100644
--- a/linux-user/ppc/Makefile.vdso
+++ b/linux-user/ppc/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/ppc64-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/ppc64/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/ppc
VPATH += $(SUBDIR)
diff --git a/linux-user/riscv/Makefile.vdso b/linux-user/riscv/Makefile.vdso
index 2c257dbfda..2eefdb70cf 100644
--- a/linux-user/riscv/Makefile.vdso
+++ b/linux-user/riscv/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/riscv64-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/riscv64/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/riscv
VPATH += $(SUBDIR)
diff --git a/linux-user/s390x/Makefile.vdso b/linux-user/s390x/Makefile.vdso
index e82bf9e29f..51f7c50a2d 100644
--- a/linux-user/s390x/Makefile.vdso
+++ b/linux-user/s390x/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/s390x-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/s390x/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/s390x
VPATH += $(SUBDIR)
diff --git a/linux-user/sh4/Makefile.vdso b/linux-user/sh4/Makefile.vdso
index 272c5d262d..ed2cc11b82 100644
--- a/linux-user/sh4/Makefile.vdso
+++ b/linux-user/sh4/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/sh4-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/sh4/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/sh4
VPATH += $(SUBDIR)
diff --git a/linux-user/x86_64/Makefile.vdso b/linux-user/x86_64/Makefile.vdso
index 26552b66db..56fe87af72 100644
--- a/linux-user/x86_64/Makefile.vdso
+++ b/linux-user/x86_64/Makefile.vdso
@@ -1,4 +1,4 @@
-include $(BUILD_DIR)/tests/tcg/x86_64-linux-user/config-target.mak
+include $(BUILD_DIR)/linux-user/x86_64/config-target.mak
SUBDIR = $(SRC_PATH)/linux-user/x86_64
VPATH += $(SUBDIR)