From: Matt Housh Date: Tue, 27 Nov 2012 16:17:18 +0000 (-0600) Subject: pkgmk, pkgmk.conf: updates for multilib X-Git-Url: http://gitweb/?a=commitdiff_plain;h=6d244ad0c04f92581dd38203bcad731a88f17d62;p=pkgutils-cross.git pkgmk, pkgmk.conf: updates for multilib --- diff --git a/pkgmk.conf b/pkgmk.conf index 3137a67..bb25f0a 100644 --- a/pkgmk.conf +++ b/pkgmk.conf @@ -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" diff --git a/pkgmk.in b/pkgmk.in index f8d8a14..97737dd 100755 --- 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 "$@"