summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2020-02-03 09:09:27 +0000
committerAlex Bennée <alex.bennee@linaro.org>2020-02-04 17:13:29 +0000
commitded663a226de48892ce7a2875c7bca579b65080c (patch)
tree367a2280f85395f0d337263c933b34622bc9a73b
parent0a7c0ae0534deed06e9a045324a03c09677d4c93 (diff)
downloadfocaccia-qemu-ded663a226de48892ce7a2875c7bca579b65080c.tar.gz
focaccia-qemu-ded663a226de48892ce7a2875c7bca579b65080c.zip
tests/tcg: add a configure compiler check for ARMv8.1 and SVE
We will need this for some tests later. The docker images already
support it by default.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200203090932.19147-13-alex.bennee@linaro.org>
-rwxr-xr-xtests/tcg/configure.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 210e68396f..e0d1fbb182 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -216,6 +216,20 @@ 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
+        ;;
+    esac
+
     enabled_cross_compilers="$enabled_cross_compilers $target_compiler"
     got_cross_cc=yes
     break