aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-01-27 09:05:47 +0200
committerRiccardo Spagni <ric@spagni.net>2015-01-27 09:05:47 +0200
commit2b3b70a261cf1408e20eded4b6f8405ee231d4d3 (patch)
treee561d3854f5cef45305b9efd34a847209521ec99
parentfixed AES support flag (diff)
downloadmonero-2b3b70a261cf1408e20eded4b6f8405ee231d4d3.tar.xz
remove aes flag, detect no sse2
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/crypto/slow-hash.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed5a25dfc..4c1209e08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,8 +185,8 @@ else()
if (NO_AES)
message(STATUS "Disabling AES support")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -mno-aes")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -mno-aes")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}")
else()
message(STATUS "Enabling AES support")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -maes")
diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c
index 9b9eecba3..2b9cb0ee5 100644
--- a/src/crypto/slow-hash.c
+++ b/src/crypto/slow-hash.c
@@ -37,7 +37,9 @@
#include "hash-ops.h"
#include "oaes_lib.h"
+#ifndef __SSE2__
#include <emmintrin.h>
+#else
#if defined(_MSC_VER)
#include <intrin.h>