diff mbox series

[v5,13/22] tests/tcg: add a configure compiler check for ARMv8.1 and SVE

Message ID 20200114150953.27659-14-alex.bennee@linaro.org
State New
Headers show
Series gdbstub refactor and SVE support (+check-tcg tweaks) | expand

Commit Message

Alex Bennée Jan. 14, 2020, 3:09 p.m. UTC
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>
---
 tests/tcg/configure.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Richard Henderson Jan. 15, 2020, 10:24 p.m. UTC | #1
On 1/14/20 5:09 AM, Alex Bennée wrote:
> +
> +    # 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

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

What's the status of the docker containers wrt the BTI and MTE extensions?  ;-)
 We already have tests for those, disabled.  I currently edit the makefile when
I want to test them explicitly.


r~
diff mbox series

Patch

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