Skip to content

Commit bbf218d

Browse files
committed
crypto: remove sha256_sse4 from the base crypto helper lib
It was unused there and a confusing outlier.
1 parent 4dbd047 commit bbf218d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/Makefile.am

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ LIBBITCOIN_WALLET_TOOL=libbitcoin_wallet_tool.a
5050
endif
5151

5252
LIBBITCOIN_CRYPTO = $(LIBBITCOIN_CRYPTO_BASE)
53+
if USE_ASM
54+
LIBBITCOIN_CRYPTO_SSE4 = crypto/libbitcoin_crypto_sse4.la
55+
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE4)
56+
endif
5357
if ENABLE_SSE41
5458
LIBBITCOIN_CRYPTO_SSE41 = crypto/libbitcoin_crypto_sse41.la
5559
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE41)
@@ -541,6 +545,10 @@ libbitcoin_wallet_tool_a_SOURCES = \
541545
#
542546

543547
# crypto #
548+
549+
# crypto_base contains the unspecialized (unoptimized) versions of our
550+
# crypto functions. Functions that require custom compiler flags and/or
551+
# runtime opt-in are omitted.
544552
crypto_libbitcoin_crypto_base_la_CPPFLAGS = $(AM_CPPFLAGS)
545553

546554
# Specify -static in both CXXFLAGS and LDFLAGS so libtool will only build a
@@ -581,9 +589,12 @@ crypto_libbitcoin_crypto_base_la_SOURCES = \
581589
crypto/siphash.cpp \
582590
crypto/siphash.h
583591

584-
if USE_ASM
585-
crypto_libbitcoin_crypto_base_la_SOURCES += crypto/sha256_sse4.cpp
586-
endif
592+
# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and
593+
# CXXFLAGS above
594+
crypto_libbitcoin_crypto_sse4_la_LDFLAGS = $(AM_LDFLAGS) -static
595+
crypto_libbitcoin_crypto_sse4_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static
596+
crypto_libbitcoin_crypto_sse4_la_CPPFLAGS = $(AM_CPPFLAGS)
597+
crypto_libbitcoin_crypto_sse4_la_SOURCES = crypto/sha256_sse4.cpp
587598

588599
# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and
589600
# CXXFLAGS above

0 commit comments

Comments
 (0)