mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
Updated Compiling from source (markdown)
@@ -27,20 +27,6 @@ but different package names.
|
||||
$ sudo apt-get install build-essential automake libssl-dev libcurl4-openssl-dev libjansson-dev libgmp-dev zlib1g-dev git
|
||||
`
|
||||
|
||||
SHA support on AMD Ryzen CPUs requires gcc version 5 or higher. Add one of the following to CFLAGS for SHA
|
||||
support depending on your CPU and compiler version:
|
||||
|
||||
"-march=native" is usually the best choice and is used by build.sh
|
||||
|
||||
"-march=znver1" for Ryzen 1000 & 2000 series, znver2 for 3000.
|
||||
|
||||
"-msha" Add SHA to other tuning options
|
||||
|
||||
Additional instructions for static compilalation can be found here:
|
||||
https://lxadm.com/Static_compilation_of_cpuminer
|
||||
Static builds should only considered in a homogeneous HW and SW environment.
|
||||
Local builds will always have the best performance and compatibility.
|
||||
|
||||
#### Download cpuminer-opt
|
||||
|
||||
Download the source code for the latest release from the official repository.
|
||||
@@ -70,10 +56,24 @@ or
|
||||
|
||||
`$ CFLAGS="-O3 -march=native -Wall" ./configure --with-curl`
|
||||
|
||||
`$ make -j [N]`
|
||||
`$ make -j N`
|
||||
|
||||
N is the number of threads for the compiler to use.
|
||||
|
||||
Some newer CPU architectures may not be defined for "-march=native" in older versions of gcc and can't be compiled using the default build script. It is often possible to compile an optimum build by manually specifying options.
|
||||
|
||||
Ryzen 3000 uses "-march=znver2" natively but znver1 also works.
|
||||
|
||||
Ryzen 5000 uses "-march=znver3" natively in gcc-11 and newer. For olders versions of gcc use "-march=znver2 -mvaes"
|
||||
|
||||
Ryzen 7000 uses "-march-znver4" but is not yet defined in gcc. It can be compiled with gcc-11 by using "-march=znver3 -mavx512f -mavx512dq -mavx512bw -mavx512vl"
|
||||
|
||||
Many examples for various CPU architectures can be found in file build-allarch.sh
|
||||
|
||||
Additional instructions for static compilation can be found here at https://lxadm.com/Static_compilation_of_cpuminer
|
||||
Static builds should only considered in a homogeneous HW and SW environment.
|
||||
Local builds will always have the best performance and compatibility.
|
||||
|
||||
#### Start mining.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user