summaryrefslogtreecommitdiffstats
path: root/tests/tcg/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tcg/configure.sh')
-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 210e68396f..9eb6ba3b7e 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -216,6 +216,24 @@ for target in $target_list; do
echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak
fi
echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
+
+ # Test for compiler features for optional tests. We only do this
+ # for cross compilers because ensuring the docker containers based
+ # compilers is a requirememt for adding a new test that needs a
+ # compiler feature.
+ case $target in
+ aarch64-*)
+ if do_compiler "$target_compiler" $target_compiler_cflags \
+ -march=armv8.1-a+sve -o $TMPE $TMPC; then
+ echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak
+ fi
+ if do_compiler "$target_compiler" $target_compiler_cflags \
+ -march=-march=armv8.3-a -o $TMPE $TMPC; then
+ echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak
+ fi
+ ;;
+ esac
+
enabled_cross_compilers="$enabled_cross_compilers $target_compiler"
got_cross_cc=yes
break