From 57eac83dcd031eb79cb2df2ebb0823aec9a4488a Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 28 Mar 2019 13:33:44 +0100 Subject: [PATCH] Improve makepkg configuration. --- pacman/.config/pacman/makepkg.conf | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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)