From bbf218d06164b7247f5e9df5ba143383022fbf74 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Fri, 5 Jan 2024 11:24:13 +0000 Subject: [PATCH] crypto: remove sha256_sse4 from the base crypto helper lib It was unused there and a confusing outlier. --- src/Makefile.am | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9e7fad4a83e..6e48ac07b75 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -50,6 +50,10 @@ LIBBITCOIN_WALLET_TOOL=libbitcoin_wallet_tool.a endif LIBBITCOIN_CRYPTO = $(LIBBITCOIN_CRYPTO_BASE) +if USE_ASM +LIBBITCOIN_CRYPTO_SSE4 = crypto/libbitcoin_crypto_sse4.la +LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE4) +endif if ENABLE_SSE41 LIBBITCOIN_CRYPTO_SSE41 = crypto/libbitcoin_crypto_sse41.la LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE41) @@ -541,6 +545,10 @@ libbitcoin_wallet_tool_a_SOURCES = \ # # crypto # + +# crypto_base contains the unspecialized (unoptimized) versions of our +# crypto functions. Functions that require custom compiler flags and/or +# runtime opt-in are omitted. crypto_libbitcoin_crypto_base_la_CPPFLAGS = $(AM_CPPFLAGS) # Specify -static in both CXXFLAGS and LDFLAGS so libtool will only build a @@ -581,9 +589,12 @@ crypto_libbitcoin_crypto_base_la_SOURCES = \ crypto/siphash.cpp \ crypto/siphash.h -if USE_ASM -crypto_libbitcoin_crypto_base_la_SOURCES += crypto/sha256_sse4.cpp -endif +# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and +# CXXFLAGS above +crypto_libbitcoin_crypto_sse4_la_LDFLAGS = $(AM_LDFLAGS) -static +crypto_libbitcoin_crypto_sse4_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static +crypto_libbitcoin_crypto_sse4_la_CPPFLAGS = $(AM_CPPFLAGS) +crypto_libbitcoin_crypto_sse4_la_SOURCES = crypto/sha256_sse4.cpp # See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and # CXXFLAGS above