From aeaa0a86afd81928c279280884c9d03f15ede9df Mon Sep 17 00:00:00 2001 From: JayDDee Date: Sat, 28 Nov 2020 20:15:13 -0500 Subject: [PATCH] Updated Compiling from source (markdown) --- Compiling-from-source.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Compiling-from-source.md b/Compiling-from-source.md index 0e9de51..008d56b 100644 --- a/Compiling-from-source.md +++ b/Compiling-from-source.md @@ -220,34 +220,29 @@ Create a link to the locally compiled version of gmp.h ### Compile -You can use the default compile if you intend to use cpuminer-opt on the -same CPU and the virtual machine supports that architecture. +Compile for the CPU architecture of the host machine: -`$ ./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: - -To compile for a specific CPU architecture: - -CFLAGS="-O3 -march=znver1 -Wall" ./configure --with-curl +`CFLAGS="-O3 -march=znver1 -Wall" ./configure $CONFIGURE_ARGS` This will compile for AMD Ryzen. You can compile more generically for a set of specific CPU features 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. -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 -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: