aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenjiro Nakayama <nakayamakenjiro@gmail.com>2026-08-08 11:02:53 +0900
committerKenjiro Nakayama <nakayamakenjiro@gmail.com>2026-08-09 06:55:51 +0900
commit27882f103d16faed6bf4a3b424711da4efafff9e (patch)
treea536e538c98948b43cc779a17d7940984cb3fe2e
parent8430c1d169b83d5bfef4651e4bdacc8925dce2d1 (diff)
downloadportable-27882f103d16faed6bf4a3b424711da4efafff9e.tar.gz
portable-27882f103d16faed6bf4a3b424711da4efafff9e.tar.bz2
portable-27882f103d16faed6bf4a3b424711da4efafff9e.zip
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
-rw-r--r--CMakeLists.txt4
-rw-r--r--crypto/CMakeLists.txt3
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()
466 466
467if(ENABLE_ASM) 467if(ENABLE_ASM)
468 if(CMAKE_C_COMPILER_ABI STREQUAL "ELF") 468 if(CMAKE_C_COMPILER_ABI STREQUAL "ELF")
469 if(HOST_X86_64) 469 if(HOST_AARCH64)
470 set(HOST_ASM_ELF_AARCH64 true)
471 elseif(HOST_X86_64)
470 set(HOST_ASM_ELF_X86_64 true) 472 set(HOST_ASM_ELF_X86_64 true)
471 elseif(SOLARIS AND HOST_I386) 473 elseif(SOLARIS AND HOST_I386)
472 set(HOST_ASM_ELF_X86_64 true) 474 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)
22 ASM_AARCH64_ELF_SRC 22 ASM_AARCH64_ELF_SRC
23 sha/sha1_aarch64_ce.S 23 sha/sha1_aarch64_ce.S
24 sha/sha256_aarch64_ce.S 24 sha/sha256_aarch64_ce.S
25 sha/sha256_aarch64_ce.S 25 sha/sha512_aarch64_ce.S
26 ) 26 )
27 add_definitions(-DLIBRESSL_USE_SHA_ASSEMBLY)
27 set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_AARCH64_ELF_SRC}) 28 set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_AARCH64_ELF_SRC})
28endif() 29endif()
29 30