diff options
Diffstat (limited to 'tests/tcg/configure.sh')
-rwxr-xr-x | tests/tcg/configure.sh | 78 |
1 files changed, 50 insertions, 28 deletions
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 84f928f7f8..691d90abac 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -80,6 +80,15 @@ fi : ${cross_as_tricore="tricore-as"} : ${cross_ld_tricore="tricore-ld"} +makefile=tests/tcg/Makefile.prereqs +echo "# Automatically generated by configure - do not modify" > $makefile + +config_host_mak=tests/tcg/config-host.mak +echo "# Automatically generated by configure - do not modify" > $config_host_mak +echo "SRC_PATH=$source_path" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak + +tcg_tests_targets= for target in $target_list; do arch=${target%%-*} @@ -223,26 +232,17 @@ for target in $target_list; do echo "# Automatically generated by configure - do not modify" > $config_target_mak echo "TARGET_NAME=$arch" >> $config_target_mak - echo "target=$target" >> $config_target_mak case $target in - *-linux-user) - echo "CONFIG_USER_ONLY=y" >> $config_target_mak - echo "CONFIG_LINUX_USER=y" >> $config_target_mak - echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak - ;; - *-bsd-user) - echo "CONFIG_USER_ONLY=y" >> $config_target_mak - echo "CONFIG_BSD_USER=y" >> $config_target_mak - echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak - ;; *-softmmu) - echo "CONFIG_SOFTMMU=y" >> $config_target_mak - echo "QEMU=$PWD/qemu-system-$arch" >> $config_target_mak + test -f $source_path/tests/tcg/$arch/Makefile.softmmu-target || continue + qemu="qemu-system-$arch" + ;; + *-linux-user|*-bsd-user) + qemu="qemu-$arch" ;; esac eval "target_compiler_cflags=\${cross_cc_cflags_$arch}" - echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak got_cross_cc=no @@ -261,13 +261,12 @@ for target in $target_list; do if do_compiler "$target_compiler" $target_compiler_cflags \ -o $TMPE $TMPC ; then got_cross_cc=yes - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + echo "CC=$target_compiler" >> $config_target_mak fi else got_cross_cc=yes - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + echo "BUILD_STATIC=y" >> $config_target_mak + echo "CC=$target_compiler" >> $config_target_mak fi fi fi @@ -278,9 +277,8 @@ for target in $target_list; do if has $target_as && has $target_ld; then case $target in tricore-softmmu) - echo "CROSS_CC_GUEST=$target_as" >> $config_target_mak - echo "CROSS_AS_GUEST=$target_as" >> $config_target_mak - echo "CROSS_LD_GUEST=$target_ld" >> $config_target_mak + echo "AS=$target_as" >> $config_target_mak + echo "LD=$target_ld" >> $config_target_mak got_cross_cc=yes ;; esac @@ -337,18 +335,42 @@ for target in $target_list; do test -n "$container_image"; then for host in $container_hosts; do if test "$host" = "$cpu"; then - echo "DOCKER_IMAGE=$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> \ - $config_target_mak + echo "build-tcg-tests-$target: docker-image-$container_image" >> $makefile + echo "BUILD_STATIC=y" >> $config_target_mak + echo "CC=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" >> $config_target_mak if test -n "$container_cross_as"; then - echo "DOCKER_CROSS_AS_GUEST=$container_cross_as" >> \ - $config_target_mak + echo "AS=\$(DOCKER_SCRIPT) cc --cc $container_cross_as -i qemu/$container_image -s $source_path --" >> $config_target_mak fi if test -n "$container_cross_ld"; then - echo "DOCKER_CROSS_LD_GUEST=$container_cross_ld" >> \ - $config_target_mak + echo "LD=\$(DOCKER_SCRIPT) cc --cc $container_cross_ld -i qemu/$container_image -s $source_path --" >> $config_target_mak fi + case $target in + aarch64-*) + echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak + echo "CROSS_CC_HAS_SVE2=y" >> $config_target_mak + echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak + echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak + echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak + ;; + ppc*) + echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak + ;; + i386-linux-user) + echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak + ;; + esac + got_cross_cc=yes + break fi done fi + if test $got_cross_cc = yes; then + mkdir -p tests/tcg/$target + echo "QEMU=$PWD/$qemu" >> $config_target_mak + echo "EXTRA_CFLAGS=$target_compiler_cflags" >> $config_target_mak + echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile + tcg_tests_targets="$tcg_tests_targets $target" + fi done +echo "TCG_TESTS_TARGETS=$tcg_tests_targets" >> $makefile |