move endbr64 removal to preprocessor

This commit is contained in:
Brent Cook 2023-07-03 16:34:38 +03:00
parent 559f40996a
commit 11dfc90f83
3 changed files with 2 additions and 9 deletions

View File

@ -111,6 +111,7 @@ if(HOST_ASM_MACOSX_X86_64)
bn/arch/amd64/word_clz.S
bn/arch/amd64/bn_arch.c
)
add_definitions(-Dendbr64)
add_definitions(-DAES_ASM)
add_definitions(-DBSAES_ASM)
add_definitions(-DVPAES_ASM)

View File

@ -34,6 +34,7 @@ ASM_X86_64_MACOSX += bn/arch/amd64/bn_arch.c
EXTRA_DIST += $(ASM_X86_64_MACOSX)
if HOST_ASM_MACOSX_X86_64
libcrypto_la_CPPFLAGS += -Dendbr64
libcrypto_la_CPPFLAGS += -DAES_ASM
libcrypto_la_CPPFLAGS += -DBSAES_ASM
libcrypto_la_CPPFLAGS += -DVPAES_ASM

View File

@ -194,11 +194,6 @@ 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() {
@ -210,8 +205,6 @@ 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
@ -238,8 +231,6 @@ 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