summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-04-22 19:46:13 -0400
committerJeffrey Walton <noloader@gmail.com>2017-04-22 19:46:13 -0400
commit7562e38ad6704810d8ed7eef58f9a5d92c24dce3 (patch)
treeb2ed3af99c0b015b2e64d1e5a120b9b29a990cc4 /GNUmakefile
parentf818d4e50fea71c58baef7b29318a58ab1f349ce (diff)
downloadcryptopp-git-7562e38ad6704810d8ed7eef58f9a5d92c24dce3.tar.gz
Add safety for SHA intructions
It looks like SHA support appeared in the GCC compiler around 4.8 or 4.9. It looks like SHA support appeared in the GNU assembler around 2.23
Diffstat (limited to 'GNUmakefile')
-rwxr-xr-xGNUmakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index dc987bce..b0b57c2e 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -148,6 +148,7 @@ ifneq ($(HAVE_GAS),0)
GAS210_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
GAS217_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
GAS219_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
+ GAS223_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.2[3-9]|2\.[3-9]|[3-9])")
endif
ICC111_OR_LATER := $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])")
@@ -172,6 +173,11 @@ else
ifeq ($(HAVE_GAS)$(GAS219_OR_LATER),10)
CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
DISABLE_NATIVE_ARCH := 1
+else
+ifeq ($(HAVE_GAS)$(GAS223_OR_LATER),10)
+CXXFLAGS += -DCRYPTOPP_DISABLE_SHA
+DISABLE_NATIVE_ARCH := 1
+endif
endif
endif
endif