# The toolchain will be installed into PREFIX export PREFIX=/usr/local/pacman # Setup toolchain search paths export PATH=$PREFIX/root/bin:$PREFIX/bin:$PATH export MANPATH=$PREFIX/root/share/man:$PREFIX/share/man:$MANPATH export PKG_CONFIG_PATH=$PREFIX/root/lib/pkgconfig: # Basic compile/link flags export CFLAGS="-I$PREFIX/root/include -O2 -pipe" export LDFLAGS="-L$PREFIX/root/lib" # Use the most basic locale possible export LANG=C # Helper for `make -j` calls if [[ $(type -P nproc) ]]; then export CPU_COUNT=$(nproc --ignore 1) else export CPU_COUNT=$(python -c 'import os; print(os.cpu_count())') if (( CPU_COUNT > 1 )); then (( CPU_COUNT-- )); fi fi