Add -msse2 to i586 build (Issue 494)

pull/507/head
Jeffrey Walton 2017-09-12 21:23:23 -04:00
parent 2b24f5b9fe
commit 502fdc61c9
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 9 additions and 0 deletions

View File

@ -198,6 +198,11 @@ endif # -DCRYPTOPP_DISABLE_SSSE3
endif # -DCRYPTOPP_DISABLE_ASM
endif # CXXFLAGS
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
ifeq ($(IS_X86),1)
CPU_FLAG = -msse2
endif
endif
ifeq ($(findstring -DCRYPTOPP_DISABLE_SSSE3,$(CXXFLAGS)),)
HAVE_SSSE3 = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -mssse3 -dM -E - 2>/dev/null | $(GREP) -i -c __SSSE3__)
ifeq ($(HAVE_SSSE3),1)
@ -940,6 +945,10 @@ aria-simd.o : aria-simd.cpp
blake2-simd.o : blake2-simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(BLAKE2_FLAG) -c) $<
# SSE2 on i586
cpu.o : cpu.cpp
$(CXX) $(strip $(CXXFLAGS) $(CPU_FLAG) -c) $<
# SSE4.2 or ARMv8a available
crc-simd.o : crc-simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CRC_FLAG) -c) $<