Last active
January 30, 2024 13:00
-
-
Save yuri1969/04d824936431f6ae178f31022b46cd31 to your computer and use it in GitHub Desktop.
Gentoo Portage make.conf - ThinkPad T430
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################### | |
# | |
# ThinkPad T430 | |
# | |
# i5-3320M, 3rd Gen Intel GFX, SSD Intel 240G | |
# | |
################################################### | |
# Prefer stability over agressive optimizations | |
# Use '-march=native' since working fine; check: 'echo | gcc -### -E - -march=native' | |
# Align functions to 32B since that's Intel's fetch size in Sandy Bridge and newer processors | |
# Align variables to cache line size | |
# Enable vectorization in order to utilize SIMDs | |
COMMON_FLAGS="-march=native -O2 -pipe -falign-functions=32 -ftree-vectorize -ftree-slp-vectorize" | |
CFLAGS="${COMMON_FLAGS}" | |
CXXFLAGS="${COMMON_FLAGS}" | |
FCFLAGS="${COMMON_FLAGS}" | |
FFLAGS="${COMMON_FLAGS}" | |
LDFLAGS="${LDFLAGS} -Wl,--hash-style=gnu" | |
# https://rust-lang-nursery.github.io/packed_simd/perf-guide/target-feature/rustflags.html | |
RUSTFLAGS="-C target-cpu=native -C opt-level=3" | |
# Available x86 instruction sets; https://wiki.gentoo.org/wiki/CPU_FLAGS_* | |
CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" | |
# Allow spawning 4 parallel make jobs; Target 4 logical CPU threads; 4 + 1 would make the CPU choke https://wiki.gentoo.org/wiki/MAKEOPTS | |
MAKEOPTS="-j4" | |
# Restrict Emerge to build just a single package (--jobs 1 * -j4 => 4); https://wiki.gentoo.org/wiki/EMERGE_DEFAULT_OPTS | |
EMERGE_DEFAULT_OPTS="--ask --jobs 1 --quiet-build y" | |
# Deprioritize build jobs CPU - 'Idle' scheduling class | |
PORTAGE_SCHEDULING_POLICY="idle" | |
# Deprioritize build jobs I/O - 'Idle' scheduling class | |
PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}" | |
# Save messages after emerging to /var/log/portage/elog | |
PORTAGE_ELOG_SYSTEM="echo save" | |
# By app-portage/mirrorselect | |
GENTOO_MIRRORS="ftp://gentoo.mirror.web4u.cz/ ftp://tux.rainside.sk/gentoo/" | |
# Minor security tuning | |
FEATURES="userfetch" | |
# USE flags for a GNOME, SMP targeted laptop installation; Used with '/desktop/gnome/systemd' profile; https://packages.gentoo.org/useflags | |
HARDWARE="acpi alsa apm bluetooth mtp nat gpu-accel openal openmp sharedmem smp tcmalloc threads aio upnp upnp-av udev lm-sensors usb wifi xkb" | |
COMPRESSION="bzip2 gzip lz4 lzma lzo rar snappy zip zlib zstd" | |
GNOME="gnome gtk gtk3 gtkstyle networkmanager pulseaudio" | |
# Intel Modesetting DDX & libinput | |
DRIVERS="i965 glamor libinput" | |
GRAPHICS="X dri opengl vulkan vaapi truetype cleartype corefonts xft colord" | |
# LTO requires over 8GiB RAM - disable the 'lto' USE flag individually | |
COMPILATION="lto" | |
DISABLE="-mpi -kde -qt5 -wayland -vdpau -consolekit -cups -gallium -ppp -ieee1394 -dc1394 -ldap -btrfs -zfs -opencl -samba -icu -libav -ssh1 -bindist -webengine" | |
MISC="systemd dbus startup-notification libnotify bash-completion ssl curl http seccomp json latex raw exif gd xmp unicode fontconfig branding offensive" | |
# Merge all subsets | |
USE="${HARDWARE} ${COMPRESSION} ${GNOME} ${GRAPHICS} ${DRIVERS} ${COMPILATION} ${DISABLE} ${MISC}" | |
# AMD64 architecture; http://www.gentoo.org/doc/en/change-chost.xml | |
CHOST="x86_64-pc-linux-gnu" | |
LINGUAS="en" | |
L10N="en" | |
# Intel GMA Gen 7 - IvyBridge; https://wiki.gentoo.org/wiki/Intel | |
VIDEO_CARDS="intel i965" | |
# Input devices | |
INPUT_DEVICES="libinput" | |
# EFI 64 instead of legacy BIOS | |
GRUB_PLATFORMS="efi-64" | |
# Install only firmware for the current CPU | |
MICROCODE_SIGNATURES="-S" | |
# Filter LLVM's targets to x86 only | |
LLVM_TARGETS="X86" | |
# This sets the language of build output to English. | |
# Please keep this setting intact when reporting bugs. | |
LC_MESSAGES=C.utf8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment