diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-03-13 11:32:48 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-03-13 11:32:48 -0400 |
| commit | 0986e78484599ae055896f00b88ad588c6ba2d81 (patch) | |
| tree | 6c15225d13d1989a96685d5e68d95178b43310e5 /pkgbuild/toolchain.env | |
| parent | c9dcc820b15fb98a7288aed6c87570a263e6dd63 (diff) | |
| download | pacman-buildsys-0986e78484599ae055896f00b88ad588c6ba2d81.tar.gz | |
Diffstat (limited to 'pkgbuild/toolchain.env')
| -rw-r--r-- | pkgbuild/toolchain.env | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgbuild/toolchain.env b/pkgbuild/toolchain.env new file mode 100644 index 0000000..baaf2e8 --- /dev/null +++ b/pkgbuild/toolchain.env @@ -0,0 +1,22 @@ +# 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 |
