From 27882f103d16faed6bf4a3b424711da4efafff9e Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Sat, 8 Aug 2026 11:02:53 +0900 Subject: cmake: enable SHA assembly on ELF AArch64 Autotools already enables the AArch64 SHA assembly for ELF targets, while CMake does not enable the corresponding assembly path. Bring CMake in line with Autotools: - Enable HOST_ASM_ELF_AARCH64 for ELF AArch64 - Use the existing SHA-1 and SHA-256 assembly sources - Replace the duplicate SHA-256 entry with the missing SHA-512 source - Define LIBRESSL_USE_SHA_ASSEMBLY --- CMakeLists.txt | 4 +++- crypto/CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98a0299..b65b4a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,7 +466,9 @@ endif() if(ENABLE_ASM) if(CMAKE_C_COMPILER_ABI STREQUAL "ELF") - if(HOST_X86_64) + if(HOST_AARCH64) + set(HOST_ASM_ELF_AARCH64 true) + elseif(HOST_X86_64) set(HOST_ASM_ELF_X86_64 true) elseif(SOLARIS AND HOST_I386) set(HOST_ASM_ELF_X86_64 true) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index d566182..491b9b4 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -22,8 +22,9 @@ if(HOST_ASM_ELF_AARCH64) ASM_AARCH64_ELF_SRC sha/sha1_aarch64_ce.S sha/sha256_aarch64_ce.S - sha/sha256_aarch64_ce.S + sha/sha512_aarch64_ce.S ) + add_definitions(-DLIBRESSL_USE_SHA_ASSEMBLY) set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_AARCH64_ELF_SRC}) endif() -- cgit v1.2.3-55-g6feb