diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 72d4aee..46004a6 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -58,9 +58,6 @@ libcurl-devel and an development packages are required to be installed to build this application and are available in most Linux repositories. -To compile on older CPUs without AES_NI support use the following -CFLAGS options: "-O3 -march=native -DNO_AES_NI" - Bugs ---- diff --git a/algo/echo/aes_ni/hash.c b/algo/echo/aes_ni/hash.c index c5574d3..e4fac3d 100644 --- a/algo/echo/aes_ni/hash.c +++ b/algo/echo/aes_ni/hash.c @@ -7,7 +7,6 @@ * - implements NIST hash api * - assumes that message lenght is multiple of 8-bits * - _ECHO_VPERM_ must be defined if compiling with ../main.c - * - define NO_AES_NI for aes_ni version * * Cagdas Calik * ccalik@metu.edu.tr diff --git a/algo/groestl/aes_ni/groestl-version.h b/algo/groestl/aes_ni/groestl-version.h index cdbd816..3301381 100644 --- a/algo/groestl/aes_ni/groestl-version.h +++ b/algo/groestl/aes_ni/groestl-version.h @@ -1,3 +1,4 @@ +#include "miner.h" // specify assembly or intrinsics implementation //#define TASM #define TINTR diff --git a/algo/hodl/aes.c b/algo/hodl/aes.c index 36e081d..6f1f901 100644 --- a/algo/hodl/aes.c +++ b/algo/hodl/aes.c @@ -1,6 +1,8 @@ #include #include +#include "miner.h" + #ifndef NO_AES_NI static inline void ExpandAESKey256_sub1(__m128i *tmp1, __m128i *tmp2) diff --git a/build.sh b/build.sh index a0521ab..51a28d2 100755 --- a/build.sh +++ b/build.sh @@ -16,9 +16,11 @@ rm -f config.status # extracflags="-O3 -march=native -Wall -D_REENTRANT -funroll-loops -fvariable-expansion-in-unroller -fmerge-all-constants -fbranch-target-load-optimize2 -fsched2-use-superblocks -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16" # Debian 7.7 / Ubuntu 14.04 (gcc 4.7+) -#extracflags="$extracflags -Ofast -flto -fuse-linker-plugin -ftree-loop-if-convert-stores" +extracflags="$extracflags -O3 -march=native -ftree-loop-if-convert-stores -DUSE_ASM" -./configure --with-crypto --with-curl CFLAGS="-O3 -march=native -Wall" +CFLAGS="$extracflags" \ +CXXFLAGS="$CFLAGS" \ +./configure --with-crypto --with-curl make -j 4 diff --git a/miner.h b/miner.h index f6439b5..838dd99 100644 --- a/miner.h +++ b/miner.h @@ -14,12 +14,6 @@ #undef USE_ASM #endif -#ifndef NO_AES_NI - #ifndef __AES__ - #define NO_AES_NI - #endif -#endif - /* missing arch defines for msvc */ #if defined(_M_X64) #define __i386__ 1 @@ -28,6 +22,12 @@ #define __i386__ 1 #endif +#else /* _MSC_VER */ + +#ifndef __AES__ +#define NO_AES_NI +#endif + #endif /* _MSC_VER */ #include