1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-19 01:09:58 +00:00

Merge pull request #1120 from majestrate/aesni-osx

FIX AESNI build on osx with homebrew
This commit is contained in:
orignal 2018-02-19 10:19:45 -05:00 committed by GitHub
commit c8936c79bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 4 deletions

View File

@ -33,10 +33,13 @@ endif
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html # http://www.hutsby.net/2011/08/macs-with-aes-ni.html
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2 # Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic # Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
# note from psi: 2009 macbook does not have aesni ifeq ($(USE_AESNI),yes)
#ifeq ($(USE_AESNI),yes) CXXFLAGS += -maes -DAESNI
# CXXFLAGS += -maes -DAESNI endif
#endif ifeq ($(USE_AVX),1)
CXXFLAGS += -mavx
endif
# Disabled, since it will be the default make rule. I think its better # Disabled, since it will be the default make rule. I think its better
# to define the default rule in Makefile and not Makefile.<ostype> - torkel # to define the default rule in Makefile and not Makefile.<ostype> - torkel

View File

@ -3,6 +3,15 @@
#include <cpuid.h> #include <cpuid.h>
#endif #endif
#include "Log.h" #include "Log.h"
#ifndef bit_AES
#define bit_AES (1 << 25)
#endif
#ifndef bit_AVX
#define bit_AVX (1 << 28)
#endif
namespace i2p namespace i2p
{ {
namespace cpu namespace cpu