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>
This commit is contained in:
Alex Bennée committed 2026-09-18 14:02:24 +01:00
1 parent debbadcdf3
commit 7e90d6e9ee
11 files changed
+39 -56

No files matched your search

Vendored
+29 -46
View File
@@ -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
xtensa*-linux-user)
# the toolchain is not complete with headers, only build system tests
*-linux-user)
;;
*)
continue
;;
*-softmmu)
test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
qemu="qemu-system-$arch"
;;
*-linux-user|*-bsd-user)
qemu="qemu-$arch"
;;
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"
arch=${target%%-*}
case $arch in
xtensa*-linux-user)
# the toolchain can only build system tests due to missing headers
continue
;;
aarch64_be-linux-user)
# there is no BE user space
continue
;;
aarch64|arm|hppa|i386|loongarch64|ppc64|riscv64|s390x|sh4|x86_64)
# arches which need a vdso, some 64 bit arches build both
;;
*)
continue
;;
esac
# 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() {
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)