-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.conf
122 lines (106 loc) · 5.39 KB
/
make.conf
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
##
# Pull in LTO settings. NTHREADS must be first line, follows by sourcing the config. No exceptions, always first.
# During the LTO step, we default the parallelism to the number of processors, as detected by the compiler.
##
NTHREADS="auto"
LTO_OVERLAY_PATH="/var/db/repos/lto-overlay"
source make.conf.lto
##
# Ninja's a bit faster than GNU Make, so this might speed things up very slightly.
##
CMAKE_MAKEFILE_GENERATOR=ninja
##
# Don't change the CFLAGS.
##
# Set the baseline to compile as generic x86_64 with some extensions.
# Specifically:
# Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, CX16, SAHF and FXSR instruction set support.
# Info comes from: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#x86-Options
#
# Note that while that gets us a good way toward x86_64-v2, we're still missing popcnt, sse4_1 and sse4_2
# Not all my machines have the two sse4 sets, but do have popcnt, so we'll throw popcnt in there as an extra flag.
#
# Regarding choosing core2, note that the next higher cpu model, nehalem, has sse4_1 and sse4_2, so core2
# is the highest processor that has everything my weakest systems (unas) support.
CFLAGS="${CFLAGS} -march=core2 -mtune=generic -mpopcnt"
CXXFLAGS="${CFLAGS} ${CXXFLAGS}"
LDFLAGS="${LDFLAGS}"
##
# You can touch these, but you probably don't want or need to.
##
PORTAGE_LOGDIR=/var/log/portage/
PORTAGE_COMPRESS=zstd
PORTAGE_COMPRESS_FLAGS=-15
PORTAGE_NICENESS=20
BINPKG_FORMAT=gpkg
BINPKG_COMPRESS=zstd
BINPKG_COMPRESS_FLAGS=-15
FEATURES="${FEATURES} buildpkg binpkg-multi-instance clean-logs compress-build-logs parallel-fetch parallel-install split-elog split-log userfetch usersync"
FEATURES="${FEATURES} compressdebug installsources splitdebug"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs --keep-going --newrepo --newuse --changed-use --changed-deps --changed-slot --deep --tree --unordered-display --backtrack=3000 --complete-graph --with-bdeps=y"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --rebuild-if-new-rev --rebuild-if-new-ver --rebuild-if-unbuilt --rebuilt-binaries"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --binpkg-respect-use=y --binpkg-changed-deps=y --usepkg=y"
# Don't bother making binpkgs for packages that wont benefit from it. The time spent compressing would just be wasted.
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='virtual/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='sys-kernel/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='*/*-bin'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='acct-user/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='acct-group/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='app-alternatives/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --buildpkg-exclude='dev-perl/*'"
# Don't bother insalling binpkgs packages that wont benefit from it. Even if they are available, the decompression would be just a waste of time
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='virtual/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='sys-kernel/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='*/*-bin'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='acct-user/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='acct-group/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='app-alternatives/*'"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg-exclude='dev-perl/*'"
##
# Use these to configure what features your programs are built with.
##
INPUT_DEVICES="libinput"
VIDEO_CARDS="vesa"
LINGUAS="en en_US"
L10N="en en-US"
QEMU_USER_TARGETS="aarch64 x86_64"
QEMU_SOFTMMU_TARGETS="aarch64 x86_64"
# Raspberry pi, x86_64
LLVM_TARGETS="AArch64 AMDGPU BPF WebAssembly X86"
# cpuid2cpuflags claims these should be added, which aren't otherwise by the abi-levels.
CPU_FLAGS_X86="${CPU_FLAGS_X86} mmxext sse sse3"
# All machines have x86_64-v1
CPU_FLAGS_X86="${CPU_FLAGS_X86} lm cmov cx8 fpu fxsr mmx syscall sse2"
# And all of them have the x86_64-v2 instructions, except the unas don't have sse4_1 or sse4_2.
CPU_FLAGS_X86="${CPU_FLAGS_X86} cx16 lahf_lm popcnt ssse3"
ABI_X86="64"
##
# Remove files that aren't relevant to systemd systems
##
INSTALL_MASK="${INSTALL_MASK} /etc/init.d/*"
INSTALL_MASK="${INSTALL_MASK} /etc/cron.*/*"
INSTALL_MASK="${INSTALL_MASK} /etc/runlevels//*"
##
# Remove documentation files that no one ever looks at
##
INSTALL_MASK="${INSTALL_MASK} /usr/share/doc/*/"
##
# Remove .desktop files that add unnecessary items to the desktop menu.
##
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/htop.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/xterm.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/uxterm.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/elementary_perf.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/elementary_test.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/spicy-spice-gtk.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/linguist6-qttools-6.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/assistant6-qttools-6.desktop"
INSTALL_MASK="${INSTALL_MASK} /usr/share/applications/qdbusviewer6-qttools-6.desktop"
##
# Don't include files that are excluded above into binpkgs
##
PKG_INSTALL_MASK="${PKG_INSTALL_MASK} {INSTALL_MASK}"
##
# Load settings local to this machine only
##
source /etc/portage/make.local