Configuration_Files/system/etc/profile.d/kiss_opts.sh

28 lines
957 B
Bash

#!/bin/sh -e
# Calculate our path.
export KISS_PATH="/var/db/kiss/repos/kiss-mfavila/ports:$(du -d5 /var/db/kiss/repos|cut -f 2|grep -v \\.|sort|tr '\n' ':')"
# Set privilege escalation tool.
export KISS_SU="sup"
# Set download utility.
# snarf - tiny single-theaded
# axel - tiny multi-threaded
# wget - large single-threaded
# aria2 - large multi-threaded
# curl - default, HTTP toolkit, very large
export KISS_DL="axel"
# Compile-time flags.
export CFLAGS="-pipe -w -D_GLIBCXX_ASSERTIONS -D_FORTIFY_SOURCE=1 -O2 -march=haswell -fno-asynchronous-unwind-tables -momit-leaf-frame-pointer -ftree-loop-vectorize -fstack-protector-strong --param ssp-buffer-size=4 -fstack-clash-protection -fPIE -fPIC -Wl,--hash-style=gnu"
export CXXFLAGS="$CFLAGS"
export FFLAGS="$CFLAGS"
export LDFLAGS=""
# Set makejobs to the number of threads minus two.
export MAKEFLAGS="-j$(($(cat /proc/cpuinfo|grep cores|wc -l)-2))"
# Build in memory.
export XDG_CACHE_HOME=/tmp