From 6d244ad0c04f92581dd38203bcad731a88f17d62 Mon Sep 17 00:00:00 2001 From: Matt Housh Date: Tue, 27 Nov 2012 10:17:18 -0600 Subject: [PATCH] pkgmk, pkgmk.conf: updates for multilib --- pkgmk.conf | 19 +++++++++++++++++-- pkgmk.in | 6 ++++++ 2 files changed, 23 insertions(+), 2 deletions(-) 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 "$@" -- 2.26.2