aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2021-05-12 11:20:50 +0100
committerAlex Bennée <alex.bennee@linaro.org>2021-05-18 09:36:21 +0100
commitcf22f936f29bc1ee8fff5fbc16064208571a448c (patch)
tree178289fd238166dfe25e63e47b0cbe80cb3267a8 /tests/tcg
parentec6b219a4e25139ae4305c57f3e41bbd4ee36997 (diff)
downloadqemu-cf22f936f29bc1ee8fff5fbc16064208571a448c.zip
qemu-cf22f936f29bc1ee8fff5fbc16064208571a448c.tar.gz
qemu-cf22f936f29bc1ee8fff5fbc16064208571a448c.tar.bz2
tests/tcg: don't allow clang as a cross compiler
Currently there are two problems. The first is clang generates a preamble (that is always executed) to stack xmm registers. This causes a ILLOP on the x86_64 softmmu tests as SSE isn't enabled. The second is the inline assembler in test-i386.c breaks clangs compiler and I don't know how to fix it. Even with Theodore's patch series (D5741445-7EFD-4AF1-8DB2-E4AFA93CBB1A@icloud.com) I still get compiler failures. For now lets just skip clang and allow it to fall back to the containers which we know have compilers which work. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210512102051.12134-31-alex.bennee@linaro.org>
Diffstat (limited to 'tests/tcg')
-rwxr-xr-xtests/tcg/configure.sh33
1 files changed, 22 insertions, 11 deletions
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 6627318..ed6492c 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -82,6 +82,9 @@ for target in $target_list; do
container_cross_as=
container_cross_ld=
+ # suppress clang
+ supress_clang=
+
case $target in
aarch64-*)
# We don't have any bigendian build tools so we only use this for AArch64
@@ -119,6 +122,7 @@ for target in $target_list; do
container_hosts=x86_64
container_image=fedora-i386-cross
container_cross_cc=gcc
+ supress_clang=yes
;;
m68k-*)
container_hosts=x86_64
@@ -186,6 +190,7 @@ for target in $target_list; do
container_hosts="aarch64 ppc64el x86_64"
container_image=debian-amd64-cross
container_cross_cc=x86_64-linux-gnu-gcc
+ supress_clang=yes
;;
xtensa*-softmmu)
container_hosts=x86_64
@@ -200,6 +205,7 @@ 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 | *-bsd-user)
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
@@ -219,21 +225,26 @@ for target in $target_list; do
if eval test "x\${cross_cc_$arch}" != xyes; then
eval "target_compiler=\${cross_cc_$arch}"
- if has $target_compiler; then
- write_c_skeleton
- if ! do_compiler "$target_compiler" $target_compiler_cflags \
- -o $TMPE $TMPC -static ; then
- # For host systems we might get away with building without -static
- if do_compiler "$target_compiler" $target_compiler_cflags \
- -o $TMPE $TMPC ; then
+ if has "$target_compiler"; then
+ if test "$supress_clang" = yes &&
+ $target_compiler --version | grep -qi "clang"; then
+ got_cross_cc=no
+ else
+ write_c_skeleton
+ if ! do_compiler "$target_compiler" $target_compiler_cflags \
+ -o $TMPE $TMPC -static ; then
+ # For host systems we might get away with building without -static
+ 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
+ fi
+ else
got_cross_cc=yes
echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak
echo "CROSS_CC_GUEST=$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
fi
fi
fi