tests/tcg: gate pauth-% tests on having compiler support
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 3 Feb 2020 09:09:28 +0000 (09:09 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 4 Feb 2020 17:13:29 +0000 (17:13 +0000)
Otherwise we end up failing to build our tests on CI which may have
older compilers that the user expects. We can get rid of this once we
can fallback to multiarch containers.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200203090932.19147-14-alex.bennee@linaro.org>

tests/tcg/aarch64/Makefile.softmmu-target
tests/tcg/aarch64/Makefile.target
tests/tcg/configure.sh

index f6b5121f5ce751b09a7584866d07202242e0d87f..d2299b98b76c285aabab4afba23b76c29e1eba9c 100644 (file)
@@ -61,7 +61,13 @@ run-memory-replay: memory-replay run-memory-record
                  $(QEMU_OPTS) memory, \
          "$< on $(TARGET_NAME)")
 
-run-pauth-3: pauth-3
-pauth-3: CFLAGS += -march=armv8.3-a
+EXTRA_TESTS+=memory-record memory-replay
 
-EXTRA_TESTS+=memory-record memory-replay pauth-3
+ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_3),)
+pauth-3: CFLAGS += -march=armv8.3-a
+else
+pauth-3:
+       $(call skip-test, "BUILD of $@", "missing compiler support")
+run-pauth-3:
+       $(call skip-test, "RUN of pauth-3", "not built")
+endif
index efa67cf1e9ef27ca2108954f9e0e85b82e52da8e..8ed477d0d51063f05bbe3c927e7df49b342c39c5 100644 (file)
@@ -18,9 +18,11 @@ run-fcvt: fcvt
        $(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
 
 # Pauth Tests
+ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_3),)
 AARCH64_TESTS += pauth-1 pauth-2 pauth-4
 run-pauth-%: QEMU_OPTS += -cpu max
 pauth-%: CFLAGS += -march=armv8.3-a
+endif
 
 # Semihosting smoke test for linux-user
 AARCH64_TESTS += semihosting
index e0d1fbb182f46bb1255296814c2e59b46c3af3de..9eb6ba3b7ea786fc47a4ae8875b38a5e54d58e4d 100755 (executable)
@@ -227,6 +227,10 @@ for target in $target_list; do
                -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