From 4e3a1ea962d8f8cc58b97d2dd59554479a2b2db9 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 15 Jul 2018 08:35:14 -0400 Subject: Add ARMv8.4 cpu feature detection support (GH #685) (#687) This PR adds ARMv8.4 cpu feature detection support. Previously we only needed ARMv8.1 and things were much easier. For example, ARMv8.1 `__ARM_FEATURE_CRYPTO` meant PMULL, AES, SHA-1 and SHA-256 were available. ARMv8.4 `__ARM_FEATURE_CRYPTO` means PMULL, AES, SHA-1, SHA-256, SHA-512, SHA-3, SM3 and SM4 are available. We still use the same pattern as before. We make something available based on compiler version and/or preprocessor macros. But this time around we had to tighten things up a bit to ensure ARMv8.4 did not cross-pollinate down into ARMv8.1. ARMv8.4 is largely untested at the moment. There is no hardware in the field and CI lacks QEMU with the relevant patches/support. We will probably have to revisit some of this stuff in the future. Since this update applies to ARM gadgets we took the time to expand Android and iOS testing on Travis. Travis now tests more platforms, and includes Autotools and CMake builds, too. --- .travis.yml | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index cc5fc8af..d7c84d2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,8 +51,16 @@ matrix: include: - os: linux env: - - BUILD_MODE=android - - PLATFORM=armeabi + - BUILD_MODE=autotools + - os: linux + env: + - BUILD_MODE=cmake + - os: osx + env: + - BUILD_MODE=autotools + - os: osx + env: + - BUILD_MODE=cmake - os: linux env: - BUILD_MODE=android @@ -85,6 +93,10 @@ matrix: env: - BUILD_MODE=ios - PLATFORM=iPhoneOS + - os: osx + env: + - BUILD_MODE=ios + - PLATFORM=Arm64 - os: osx env: - BUILD_MODE=ios @@ -103,10 +115,24 @@ matrix: env: - BUILD_MODE=ios - PLATFORM=WatchOS + - os: linux + env: + - BUILD_MODE=android + - PLATFORM=armeabi + - os: linux + env: + - BUILD_MODE=android + - PLATFORM=mipsel + - os: linux + env: + - BUILD_MODE=android + - PLATFORM=mipsel64 before_install: - | if [[ "$BUILD_MODE" == "android" ]]; then + # https://github.com/travis-ci/travis-ci/issues/9037 + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145 TestScripts/install-android.sh fi @@ -114,10 +140,18 @@ script: - | if [[ "$BUILD_MODE" == "ios" ]]; then cp ./TestScripts/setenv-ios.sh . - TestScripts/cryptest-ios.sh + cp ./TestScripts/cryptest-ios.sh . + ./cryptest-ios.sh elif [[ "$BUILD_MODE" == "android" ]]; then - cp ./TestScripts/setenv-android.sh . - TestScripts/cryptest-android.sh + cp ./TestScripts/setenv-android-gcc.sh . + cp ./TestScripts/cryptest-android.sh . + ./cryptest-android.sh + elif [[ "$BUILD_MODE" == "autotools" ]]; then + cp ./TestScripts/cryptest-autotools.sh . + ./cryptest-autotools.sh + elif [[ "$BUILD_MODE" == "cmake" ]]; then + cp ./TestScripts/cryptest-cmake.sh . + ./cryptest-cmake.sh elif [[ "$BUILD_MODE" == "debug" ]]; then CXXFLAGS="-DDEBUG -g2 -O1" make -j "$BUILD_JOBS" ./cryptest.exe v -- cgit v1.2.1