forked from WyvernTKC/cpuminer-gr-avx2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-allarch.sh
executable file
·88 lines (66 loc) · 1.92 KB
/
build-allarch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
#
# This script is not intended for users, it is only used for compile testing
# during develpment. However the information contained may provide compilation
# tips to users.
#!/bin/bash
#
# This script is not intended for users, it is only used for compile testing
# during develpment. However the information contained may provide compilation
# tips to users.
rm -r bin/unix 2>/dev/null
rm cpuminer 2>/dev/null
mkdir -p bin/unix/ 2>/dev/null
DCFLAGS="-Wall -fno-common -Wextra -Wno-missing-field-initializers"
DCXXFLAGS="-Wno-ignored-attributes"
# 1 - Architecture
# 2 - Output suffix
# 3 - Additional options
compile() {
echo "Compile: $@" 1>&2
make distclean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=${1} ${3} ${DCFLAGS}" \
CXXFLAGS="$CFLAGS -std=c++20 ${DCXXFLAGS}" \
./configure --with-curl
make -j $(nproc)
strip -s cpuminer
mv cpuminer bin/unix/${4}/cpuminer-${2}
}
#Non-AES
# Generic SSE2
compile "x86-64" "sse2" "-msse"
# Core2 SSSE3
compile "core2" "ssse3"
# Nehalem SSE4.2
compile "corei7" "sse42"
#AES
# Westmere SSE4.2 AES
compile "westmere" "aes-sse42" "-maes"
# Sandybridge AVX AES
compile "corei7-avx" "avx" "-maes"
#AVX2+
# Haswell AVX2 AES
# GCC 9 doesn't include AES with core-avx2
compile "core-avx2" "avx2" "-maes"
# AMD Zen1 AVX2 SHA
compile "znver1" "zen" "-mtune=znver1"
# AMD Zen2 AVX2 SHA
compile "znver2" "zen2" "-mtune=znver2"
# AMD Zen3 AVX2 SHA VAES
# GCC 10
compile "znver3" "zen3" "-mtune=znver3"
# GCC 9
# compile "znver2" "zen3" "-mvaes -mtune=znver2"
# Icelake AVX512 SHA VAES
compile "icelake-client" "avx512-sha-vaes" "-mtune=intel"
# Rocketlake AVX512 SHA AES
compile "cascadelake" "avx512-sha" "-msha -mtune=intel"
# Slylake-X AVX512 AES
compile "skylake-avx512" "avx512" "-mtune=intel"
# Alder Lake
# GCC 11
# compile "alderlake" "avx2-sha-vaes" "-mtune=alderlake"
# GCC < 10
compile "skylake" "avx2-sha-vaes" "-mvaes -msha -mtune=intel"