diff --git a/pacman/.config/pacman/makepkg.conf b/pacman/.config/pacman/makepkg.conf index 7f7c55a..cb198fd 100644 --- a/pacman/.config/pacman/makepkg.conf +++ b/pacman/.config/pacman/makepkg.conf @@ -1,13 +1,19 @@ -# march=native and flto added -CFLAGS="-march=native -mtune=native -O2 -pipe -fstack-protector-strong" -CXXFLAGS="-march=native -mtune=native -O2 -pipe -fstack-protector-strong" -RUSTFLAGS="-C target_cpu=native" +#!/hint/bash +# Modify default build parameters to build native optimizations +CFLAGS="${CFLAGS/-mtune=generic/-mtune=native}" +CXXFLAGS="${CXXFLAGS/-mtune=generic/-mtune=native}" -# Do a parallel build. -MAKEFLAGS="-j6" +# Enable rust to do the same +export RUSTFLAGS="-C target_cpu=native" + +# Do a parallel build and enable output combining +MAKEFLAGS="-j$(nproc) -Otarget" # Use parallel compression COMPRESSXZ=(nice xz -c -z -T 0 -) # Use one central sources dir -SRCDEST="$HOME/.cache/pacman/sources" +SRCDEST="${XDG_CACHE_HOME:-$HOME/.cache}/pacman/sources" + +# Prefer sha256 checks. +INTEGRITY_CHECK=(sha256)