Land #865, fix asm on x86_64 macOS
This commit is contained in:
commit
3ef498f9e6
@ -344,7 +344,7 @@ if(ENABLE_ASM)
|
||||
endif()
|
||||
add_definitions(-DHAVE_GNU_STACK)
|
||||
elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
|
||||
set(ENABLE_ASM false)
|
||||
set(HOST_ASM_MACOSX_X86_64 true)
|
||||
elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64"))
|
||||
set(HOST_ASM_MASM_X86_64 true)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
|
@ -122,7 +122,7 @@ AM_CONDITIONAL([HOST_ASM_ELF_MIPS64],
|
||||
AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
|
||||
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
||||
AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],
|
||||
[test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" == "xenabled"])
|
||||
[test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
||||
AM_CONDITIONAL([HOST_ASM_MASM_X86_64],
|
||||
[test "x$HOST_ABI" = "xmasm" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
||||
AM_CONDITIONAL([HOST_ASM_MINGW64_X86_64],
|
||||
|
@ -194,6 +194,11 @@ fixup_masm() {
|
||||
> $2
|
||||
}
|
||||
|
||||
fixup_macosx() {
|
||||
echo Fixing up $2
|
||||
sed -e 's/endbr64//' $1 > $2
|
||||
}
|
||||
|
||||
# generate assembly crypto algorithms
|
||||
asm_src=$libcrypto_src
|
||||
gen_asm_stdout() {
|
||||
@ -205,6 +210,8 @@ gen_asm_stdout() {
|
||||
EOF
|
||||
if [ $1 = "masm" ]; then
|
||||
fixup_masm crypto/$3.tmp crypto/$3
|
||||
elif [ $1 = "macosx" ]; then
|
||||
fixup_macosx crypto/$3.tmp crypto/$3
|
||||
else
|
||||
$MV crypto/$3.tmp crypto/$3
|
||||
fi
|
||||
@ -231,6 +238,8 @@ gen_asm() {
|
||||
EOF
|
||||
if [ $1 = "masm" ]; then
|
||||
fixup_masm crypto/$3.tmp crypto/$3
|
||||
elif [ $1 = "macosx" ]; then
|
||||
fixup_macosx crypto/$3.tmp crypto/$3
|
||||
else
|
||||
$MV crypto/$3.tmp crypto/$3
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user