aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-05-27 01:21:29 -0500
committerBrent Cook <busterb@gmail.com>2023-05-27 01:21:29 -0500
commit3ef498f9e63a7a32529c86d5ba7460280b7ff306 (patch)
tree93a73e32cecabde431408ecc626175a7398a963e
parente6dbcc47dcf8090a80ea0cd6ad9e867da2450102 (diff)
parent419fbd6fba15beaea3f3e6d22ef9e161f032f460 (diff)
downloadportable-3.8.0.tar.gz
portable-3.8.0.tar.bz2
portable-3.8.0.zip
Land #865, fix asm on x86_64 macOSv3.8.0
-rw-r--r--CMakeLists.txt2
-rw-r--r--configure.ac2
-rwxr-xr-xupdate.sh9
3 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e05221c..7847830 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -344,7 +344,7 @@ if(ENABLE_ASM)
344 endif() 344 endif()
345 add_definitions(-DHAVE_GNU_STACK) 345 add_definitions(-DHAVE_GNU_STACK)
346 elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") 346 elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
347 set(ENABLE_ASM false) 347 set(HOST_ASM_MACOSX_X86_64 true)
348 elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")) 348 elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64"))
349 set(HOST_ASM_MASM_X86_64 true) 349 set(HOST_ASM_MASM_X86_64 true)
350 ENABLE_LANGUAGE(ASM_MASM) 350 ENABLE_LANGUAGE(ASM_MASM)
diff --git a/configure.ac b/configure.ac
index 6fe2ff4..51e096b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,7 +122,7 @@ AM_CONDITIONAL([HOST_ASM_ELF_MIPS64],
122AM_CONDITIONAL([HOST_ASM_ELF_X86_64], 122AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
123 [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) 123 [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
124AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], 124AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],
125 [test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" == "xenabled"]) 125 [test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
126AM_CONDITIONAL([HOST_ASM_MASM_X86_64], 126AM_CONDITIONAL([HOST_ASM_MASM_X86_64],
127 [test "x$HOST_ABI" = "xmasm" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) 127 [test "x$HOST_ABI" = "xmasm" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
128AM_CONDITIONAL([HOST_ASM_MINGW64_X86_64], 128AM_CONDITIONAL([HOST_ASM_MINGW64_X86_64],
diff --git a/update.sh b/update.sh
index d42cd58..abf2097 100755
--- a/update.sh
+++ b/update.sh
@@ -194,6 +194,11 @@ fixup_masm() {
194 > $2 194 > $2
195} 195}
196 196
197fixup_macosx() {
198 echo Fixing up $2
199 sed -e 's/endbr64//' $1 > $2
200}
201
197# generate assembly crypto algorithms 202# generate assembly crypto algorithms
198asm_src=$libcrypto_src 203asm_src=$libcrypto_src
199gen_asm_stdout() { 204gen_asm_stdout() {
@@ -205,6 +210,8 @@ gen_asm_stdout() {
205 EOF 210 EOF
206 if [ $1 = "masm" ]; then 211 if [ $1 = "masm" ]; then
207 fixup_masm crypto/$3.tmp crypto/$3 212 fixup_masm crypto/$3.tmp crypto/$3
213 elif [ $1 = "macosx" ]; then
214 fixup_macosx crypto/$3.tmp crypto/$3
208 else 215 else
209 $MV crypto/$3.tmp crypto/$3 216 $MV crypto/$3.tmp crypto/$3
210 fi 217 fi
@@ -231,6 +238,8 @@ gen_asm() {
231 EOF 238 EOF
232 if [ $1 = "masm" ]; then 239 if [ $1 = "masm" ]; then
233 fixup_masm crypto/$3.tmp crypto/$3 240 fixup_masm crypto/$3.tmp crypto/$3
241 elif [ $1 = "macosx" ]; then
242 fixup_macosx crypto/$3.tmp crypto/$3
234 else 243 else
235 $MV crypto/$3.tmp crypto/$3 244 $MV crypto/$3.tmp crypto/$3
236 fi 245 fi