nicehash / cpuminer-opt

Other
28 stars 25 forks source link

Fix build (Hodl) on OSX (with GNU Gcc 6.x/Yasm) #1

Closed kth5 closed 7 years ago

kth5 commented 8 years ago

This fixes a few issues on OSX including:

There are limitations though. The native Clang (on Sierra at least) still cannot handle assembly for the Scrypt bits and GCC cannot process them either. While these issues may never be fixed, in the meantime I can compile using the following way using homebrew:

brew install gcc yasm openssl curl gmp CC=gcc-6 CXX=g++-6 AS=yasm CFLAGS="-O3 -mtune=native -march=native -mavx -maes" CXXFLAGS="${CFLAGS}" LDFLAGS="-L/usr/local/opt/gmp/lib" ./configure --with-crypto=/usr/local/opt/openssl --with-curl=/usr/local/opt/curl --disable-assembly

Macs aren't of much interest for mining but this may prove useful to some anyhow. :)

NOTE: Using the native assembler also works but produces slower binaries. In Cryptonight the difference is around 2-3H/s per core on a i7-3615QM. AVX2 is not supported.