diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | crypto/CMakeLists.txt | 25 | ||||
-rwxr-xr-x | update.sh | 15 |
3 files changed, 41 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index caf55c1..a1ca98b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -260,6 +260,8 @@ if(ENABLE_ASM) | |||
260 | if("${CMAKE_C_COMPILER_ABI}" STREQUAL "ELF") | 260 | if("${CMAKE_C_COMPILER_ABI}" STREQUAL "ELF") |
261 | if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86_64|amd64)") | 261 | if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86_64|amd64)") |
262 | set(HOST_ASM_ELF_X86_64 true) | 262 | set(HOST_ASM_ELF_X86_64 true) |
263 | elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm") | ||
264 | set(HOST_ASM_ELF_ARMV4 true) | ||
263 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386") | 265 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386") |
264 | set(HOST_ASM_ELF_X86_64 true) | 266 | set(HOST_ASM_ELF_X86_64 true) |
265 | endif() | 267 | endif() |
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index acbbe55..5380268 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
@@ -1,3 +1,28 @@ | |||
1 | if(HOST_ASM_ELF_ARMV4) | ||
2 | set( | ||
3 | ASM_ARMV4_ELF_SRC | ||
4 | aes/aes-elf-armv4.S | ||
5 | bn/gf2m-elf-armv4.S | ||
6 | bn/mont-elf-armv4.S | ||
7 | sha/sha1-elf-armv4.S | ||
8 | sha/sha512-elf-armv4.S | ||
9 | sha/sha256-elf-armv4.S | ||
10 | modes/ghash-elf-armv4.S | ||
11 | armv4cpuid.S | ||
12 | armcap.c | ||
13 | ) | ||
14 | add_definitions(-DAES_ASM) | ||
15 | add_definitions(-DOPENSSL_BN_ASM_MONT) | ||
16 | add_definitions(-DOPENSSL_BN_ASM_GF2m) | ||
17 | add_definitions(-DGHASH_ASM) | ||
18 | add_definitions(-DSHA1_ASM) | ||
19 | add_definitions(-DSHA256_ASM) | ||
20 | add_definitions(-DSHA512_ASM) | ||
21 | add_definitions(-DOPENSSL_CPUID_OBJ) | ||
22 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_ARMV4_ELF_SRC}) | ||
23 | set_property(SOURCE ${ASM_ARMV4_ELF_SRC} PROPERTY LANGUAGE C) | ||
24 | endif() | ||
25 | |||
1 | if(HOST_ASM_ELF_X86_64) | 26 | if(HOST_ASM_ELF_X86_64) |
2 | set( | 27 | set( |
3 | ASM_X86_64_ELF_SRC | 28 | ASM_X86_64_ELF_SRC |
@@ -178,8 +178,21 @@ gen_asm() { | |||
178 | EOF | 178 | EOF |
179 | $MV $3.tmp $3 | 179 | $MV $3.tmp $3 |
180 | } | 180 | } |
181 | |||
182 | echo generating arm ASM source for elf | ||
183 | gen_asm_stdout elf aes/asm/aes-armv4.pl crypto/aes/aes-elf-armv4.S | ||
184 | gen_asm_stdout elf bn/asm/armv4-gf2m.pl crypto/bn/gf2m-elf-armv4.S | ||
185 | gen_asm_stdout elf bn/asm/armv4-mont.pl crypto/bn/mont-elf-armv4.S | ||
186 | gen_asm_stdout elf sha/asm/sha1-armv4-large.pl crypto/sha/sha1-elf-armv4.S | ||
187 | gen_asm_stdout elf sha/asm/sha256-armv4.pl crypto/sha/sha256-elf-armv4.S | ||
188 | gen_asm_stdout elf sha/asm/sha512-armv4.pl crypto/sha/sha512-elf-armv4.S | ||
189 | gen_asm_stdout elf modes/asm/ghash-armv4.pl crypto/modes/ghash-elf-armv4.S | ||
190 | $CP $libcrypto_src/armv4cpuid.S crypto | ||
191 | $CP $libcrypto_src/armcap.c crypto | ||
192 | $CP $libcrypto_src/arm_arch.h crypto | ||
193 | |||
181 | for abi in elf macosx; do | 194 | for abi in elf macosx; do |
182 | echo generating ASM source for $abi | 195 | echo generating x86_64 ASM source for $abi |
183 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl crypto/aes/aes-$abi-x86_64.S | 196 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl crypto/aes/aes-$abi-x86_64.S |
184 | gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl crypto/aes/vpaes-$abi-x86_64.S | 197 | gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl crypto/aes/vpaes-$abi-x86_64.S |
185 | gen_asm_stdout $abi aes/asm/bsaes-x86_64.pl crypto/aes/bsaes-$abi-x86_64.S | 198 | gen_asm_stdout $abi aes/asm/bsaes-x86_64.pl crypto/aes/bsaes-$abi-x86_64.S |