From 897b46ed92e47f9f18ed81ff253f698513b3641c Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Wed, 23 Aug 2017 01:46:26 +0100 Subject: core ports revision, simple configuration --- core/ports.html | 54 +++++++++++++++++++----------------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'core/ports.html') diff --git a/core/ports.html b/core/ports.html index 6a5e4a8..2d1a17d 100644 --- a/core/ports.html +++ b/core/ports.html @@ -73,45 +73,18 @@ native flag will not run on different hardware. This is the best choice if you want gcc to find the best settings based on your hardware.

-

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.

+

1.3.4. Configure prt-get

Edit /etc/prt-get.conf;

-- cgit 1.4.1-2-gfad0