Updated Compiling from source (markdown)

JayDDee
2020-11-28 20:15:13 -05:00
parent 8033daec5e
commit aeaa0a86af

@@ -220,34 +220,29 @@ Create a link to the locally compiled version of gmp.h
### Compile ### Compile
You can use the default compile if you intend to use cpuminer-opt on the Compile for the CPU architecture of the host machine:
same CPU and the virtual machine supports that architecture.
`$ ./build.sh` `CFLAGS="-O3 -march=native -Wall" ./configure $CONFIGURE_ARGS`
Otherwise you can compile manually while setting options in CFLAGS. or cross compile for a specific CPU architecture:
Some common options: `CFLAGS="-O3 -march=znver1 -Wall" ./configure $CONFIGURE_ARGS`
To compile for a specific CPU architecture:
CFLAGS="-O3 -march=znver1 -Wall" ./configure --with-curl
This will compile for AMD Ryzen. This will compile for AMD Ryzen.
You can compile more generically for a set of specific CPU features You can compile more generically for a set of specific CPU features
if you know what features you want: if you know what features you want:
CFLAGS="-O3 -maes -msse4.2 -Wall" ./configure --with-curl `CFLAGS="-O3 -maes -msse4.2 -Wall" ./configure `$CONFIGURE_ARGS`
This will compile for an older CPU that does not have AVX. This will compile for an older CPU that does not have AVX.
You can find several examples in build-allarch.sh You can find several examples in README.txt
If you have a CPU with more than 64 threads and Windows 7 or higher you If you have a CPU with more than 64 threads and Windows 7 or higher you
can enable the CPU Groups feature: can enable the CPU Groups feature by adding the following to CFLAGS:
-D_WIN32_WINNT==0x0601 `-D_WIN32_WINNT==0x0601`
Once you have run configure successfully run make with n CPU threads: Once you have run configure successfully run make with n CPU threads: