summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-03-22 17:26:25 -0400
committerJeffrey Walton <noloader@gmail.com>2017-03-22 17:26:25 -0400
commitd865cf9e62f2a9ecd5d1ba69f64d4b715eba6e24 (patch)
treeac48b27dbe5f7b2fcea8c99f259f56fecca99380 /GNUmakefile
parent2ea91ba1b97c80b8c755c7409727504b8d496a23 (diff)
downloadcryptopp-git-d865cf9e62f2a9ecd5d1ba69f64d4b715eba6e24.tar.gz
Fix OpenBSD 6.0 compile with GCC 4.9 (Issue 395)
This check-in also enables the 64-bit RDRAND routines for X32. The changes were with held until they could be tested. The testing occurred with Issue 395
Diffstat (limited to 'GNUmakefile')
-rwxr-xr-xGNUmakefile35
1 files changed, 19 insertions, 16 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 450db26c..a666c357 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -157,6 +157,23 @@ ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS_MINGW)$(SUN_COMPILER),00000)
endif
endif
+# .intel_syntax wasn't supported until GNU assembler 2.10
+# No DISABLE_NATIVE_ARCH with CRYPTOPP_DISABLE_ASM for now
+# See http://github.com/weidai11/cryptopp/issues/395
+ifeq ($(HAVE_GAS)$(GAS210_OR_LATER),10)
+CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
+else
+ifeq ($(HAVE_GAS)$(GAS217_OR_LATER),10)
+CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
+DISABLE_NATIVE_ARCH := 1
+else
+ifeq ($(HAVE_GAS)$(GAS219_OR_LATER),10)
+CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
+DISABLE_NATIVE_ARCH := 1
+endif
+endif
+endif
+
# BEGIN NATIVE_ARCH
# Guard use of -march=native (or -m{32|64} on some platforms)
# Don't add anything if -march=XXX or -mtune=XXX is specified
@@ -220,19 +237,6 @@ CXXFLAGS += -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1
endif
endif
-# .intel_syntax wasn't supported until GNU assembler 2.10
-ifeq ($(HAVE_GAS)$(GAS210_OR_LATER),10)
-CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
-else
-ifeq ($(HAVE_GAS)$(GAS217_OR_LATER),10)
-CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
-else
-ifeq ($(HAVE_GAS)$(GAS219_OR_LATER),10)
-CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
-endif
-endif
-endif
-
# GCC on Solaris needs -m64. Otherwise, i386 is default
# http://github.com/weidai11/cryptopp/issues/230
ifeq ($(IS_SUN)$(GCC_COMPILER)$(IS_X64),111)
@@ -762,9 +766,8 @@ endif # Dependencies
ifeq ($(USE_NASM),1)
rdrand.o: rdrand.h rdrand.cpp rdrand.S
$(CXX) $(strip $(CXXFLAGS)) -DNASM_RDRAND_ASM_AVAILABLE=1 -DNASM_RDSEED_ASM_AVAILABLE=1 -c rdrand.cpp
-rdrand-x86.o: ;
-rdrand-x32.o: ;
-rdrand-x64.o: ;
+rdrand-%.o:
+ ./rdrand-nasm.sh
endif
# Only use CRYPTOPP_DATA_DIR if its not set in CXXFLAGS