CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkgmk, pkgmk.conf: updates for multilib
authorMatt Housh <jaeger@morpheus.net>
Tue, 27 Nov 2012 16:17:18 +0000 (10:17 -0600)
committerMatt Housh <jaeger@morpheus.net>
Tue, 27 Nov 2012 16:17:18 +0000 (10:17 -0600)
pkgmk.conf
pkgmk.in

index 3137a67fd46f77b536b9fc9e677d4971a13ecbee..bb25f0a4d796863dbb9d14b5a674ceec4ebb4a3e 100644 (file)
@@ -2,8 +2,23 @@
 # /etc/pkgmk.conf: pkgmk(8) configuration
 #
 
-export CFLAGS="-O2 -march=i686 -pipe"
-export CXXFLAGS="-O2 -march=i686 -pipe"
+export CFLAGS="-O2 -march=x86-64 -pipe"
+export CXXFLAGS="${CFLAGS}"
+
+case ${PKGMK_ARCH} in
+       "64")
+               ;;
+       "32")
+               export CFLAGS="${CFLAGS} -m32"
+               export CXXFLAGS="${CXXFLAGS} -m32"
+               export LDFLAGS="${LDFLAGS} -m32"
+               export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
+               ;;
+       *)
+               echo "Unknown architecture selected! Exiting."
+               exit 1
+               ;;
+esac
 
 # PKGMK_SOURCE_MIRRORS=()
 # PKGMK_SOURCE_DIR="$PWD"
index f8d8a1463aae74b15f7853cf3c80922d7695d9ab..97737dd2b90dc2de4456d2bd6aa0ea55d538df06 100755 (executable)
--- a/pkgmk.in
+++ b/pkgmk.in
@@ -611,6 +611,12 @@ parse_options() {
 }
 
 main() {
+       # multilib
+       PKGMK_ARCH=64
+       if [ -f ".32bit" ]; then
+               PKGMK_ARCH=32
+       fi
+
        local FILE TARGET
        
        parse_options "$@"