From 11dfc90f83c260e99aed721cf0880ec427a9bb6f Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 3 Jul 2023 16:34:38 +0300 Subject: move endbr64 removal to preprocessor --- crypto/CMakeLists.txt | 1 + crypto/Makefile.am.macosx-x86_64 | 1 + update.sh | 9 --------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 0379899..c978c04 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -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) diff --git a/crypto/Makefile.am.macosx-x86_64 b/crypto/Makefile.am.macosx-x86_64 index b9b89cf..789da0a 100644 --- a/crypto/Makefile.am.macosx-x86_64 +++ b/crypto/Makefile.am.macosx-x86_64 @@ -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 diff --git a/update.sh b/update.sh index abf2097..d42cd58 100755 --- a/update.sh +++ b/update.sh @@ -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 -- cgit v1.2.3-55-g6feb