From 897b46ed92e47f9f18ed81ff253f698513b3641c Mon Sep 17 00:00:00 2001
From: Silvino Silva
Edit /etc/pkgmk.conf and remove pipe from compiler - flags;
- -- export CFLAGS="-O2 -march=x86-64" -- -
If you want native build change the above example to;
- -- export CFLAGS="-O2 -march=native -mtune=native" -- -
Discover number of cores/cpus to hard code -j option.
- -- $ nproc - 2 -- -
Set number of cores to use;
- -- export MAKEFLAGS="-j2" -- -
Example of complete pkgmk.conf for x86_64 with 4 cores, separate - distribution files, packages and work directories, uses crux mirror - to get the sources.
+Edit /etc/pkgmk.conf, remove pipe from compiler flags and let the system + get from nproc how many cpu's it can use for compiling;
# # /etc/pkgmk.conf: pkgmk(8) configuration # - export CFLAGS="-O2 -march=native -mtune=native" + export CFLAGS="-O2 -march=x86-64" export CXXFLAGS="${CFLAGS}" - export MAKEFLAGS="-j4" + # export MAKEFLAGS="-j$(nproc)" case ${PKGMK_ARCH} in "64"|"") @@ -128,11 +101,13 @@ ;; esac - #PKGMK_SOURCE_MIRRORS=(http://crux.nu/distfiles/) - PKGMK_SOURCE_DIR="/usr/ports/distfiles" - PKGMK_PACKAGE_DIR="/usr/ports/packages" - PKGMK_WORK_DIR="/usr/ports/work/$name" + # PKGMK_SOURCE_MIRRORS=() + # PKGMK_SOURCE_DIR="$PWD" + # PKGMK_PACKAGE_DIR="$PWD" + # PKGMK_WORK_DIR="$PWD/work" # PKGMK_DOWNLOAD="no" + # PKGMK_IGNORE_SIGNATURE="no" + # PKGMK_IGNORE_MD5SUM="no" # PKGMK_IGNORE_FOOTPRINT="no" # PKGMK_IGNORE_NEW="no" # PKGMK_NO_STRIP="no" @@ -144,6 +119,15 @@ # End of file+
If you want native build change the above example to;
+ ++ export CFLAGS="-O2 -march=native -mtune=native" ++ +
Check toolchain for more options on how packages + are build.
+Edit /etc/prt-get.conf;
-- cgit 1.4.1-2-gfad0