diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-25 12:56:30 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-25 12:56:30 +0200 |
commit | 46234f03c82e1deb20ddcc41a802d763959cc18e (patch) | |
tree | aeb1c8a2c48a193ec5496ddf1cea76c44e0405b4 /mysys/CMakeLists.txt | |
parent | 0d7380fdac1add2be3fdb57519ccd8ac9c8e12bc (diff) | |
parent | 961c7938bb4df7a19ccd8def1e57669f7600d3e5 (diff) | |
download | mariadb-git-46234f03c82e1deb20ddcc41a802d763959cc18e.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'mysys/CMakeLists.txt')
-rw-r--r-- | mysys/CMakeLists.txt | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 1a3e670878f..bd743472537 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -86,7 +86,14 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") return ret; } #include <sys/auxv.h> - int main() { foo(0); getauxval(AT_HWCAP); }" HAVE_ARMV8_CRC) + int main() { foo(0); + #ifdef __linux__ + getauxval(AT_HWCAP); + #else + unsigned long v; + elf_aux_info(AT_HWCAP, &v, sizeof(v)); + #endif + }" HAVE_ARMV8_CRC) CHECK_CXX_SOURCE_COMPILES(" asm(\".arch_extension crypto\"); @@ -95,7 +102,14 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") return ret; } #include <sys/auxv.h> - int main() { foo(0); getauxval(AT_HWCAP); }" HAVE_ARMV8_CRYPTO) + int main() { foo(0); + #ifdef __linux__ + getauxval(AT_HWCAP); + #else + unsigned long v; + elf_aux_info(AT_HWCAP, &v, sizeof(v)); + #endif + }" HAVE_ARMV8_CRYPTO) CHECK_C_COMPILER_FLAG(-march=armv8-a+crc+crypto HAVE_ARMV8_CRC_CRYPTO_MARCH) |