aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2021-07-21 00:27:00 +0100
committerAlex Bennée <alex.bennee@linaro.org>2021-07-23 17:22:16 +0100
commitc56f1ee668d504af62f09e041e584e725edfa4b8 (patch)
tree45494407b7c76f4d2eec5833af7fe40af0f44149 /tests/tcg
parent2da42253ef9af7a9c3a5e9e7fcfb1e7eb84a8bb6 (diff)
downloadqemu-c56f1ee668d504af62f09e041e584e725edfa4b8.zip
qemu-c56f1ee668d504af62f09e041e584e725edfa4b8.tar.gz
qemu-c56f1ee668d504af62f09e041e584e725edfa4b8.tar.bz2
tests/tcg/configure.sh: add handling for assembler only builds
Up until this point we only handled local compilers or assumed we had everything in the container. This falls down when we are building QEMU inside the container. This special handling only affects tricore for now but I put it in a case just in case we add any other "special" targets. Setting CROSS_CC_GUEST is a bit of a hack just to ensure the test runs as we gate on a detected compiler even though the Makefile won't actually use it. It also means we display something sane in the configure output. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210720232703.10650-27-alex.bennee@linaro.org>
Diffstat (limited to 'tests/tcg')
-rwxr-xr-xtests/tcg/configure.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index aa7c243..1f985cc 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -72,6 +72,10 @@ fi
: ${cross_cc_x86_64="x86_64-linux-gnu-gcc"}
: ${cross_cc_cflags_x86_64="-m64"}
+# tricore is special as it doesn't have a compiler
+: ${cross_as_tricore="tricore-as"}
+: ${cross_ld_tricore="tricore-ld"}
+
for target in $target_list; do
arch=${target%%-*}
@@ -247,6 +251,20 @@ for target in $target_list; do
fi
fi
fi
+
+ # Special handling for assembler only tests
+ eval "target_as=\"\${cross_as_$arch}\""
+ eval "target_ld=\"\${cross_ld_$arch}\""
+ 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
+ got_cross_cc=yes
+ ;;
+ esac
+ fi
fi
if test $got_cross_cc = yes; then