#
-# /etc/pkgmk.conf: pkgmk(8) configuration
+# pkgmk.conf: pkgmk(8) configuration
#
-export CFLAGS="-O2 -march=i686 -pipe"
-export CXXFLAGS="-O2 -march=i686 -pipe"
+export CHOST="$(echo $$MACHTYPE)"
+export CTARGET="arm-unknown-linux-gnu"
+
+export CLFS = /devel/crux-arm/toolchain/clfs
+export CROSSTOOLS = /devel/crux-arm/toolchain/crosstools
+
+export PATH="$CROSSTOOLS/bin:$PATH"
+export LD_LIBRARY_PATH="$CROSSTOOLS/lib:$CROSSTOOLS/usr/lib"
+
+export CC="$CTARGET-gcc"
+export CXX="$CTARGET-g++"
+export AR="$CTARGET-ar"
+export AS="$CTARGET-as"
+export RANLIB="$CTARGET-ranlib"
+export LD="$CTARGET-ld"
+export STRIP="$CTARGET-strip"
+
+export CFLAGS="-O2 -pipe"
+export CXXFLAGS="-O2 -pipe"
+
+STRIP_CMD="$STRIP"
# PKGMK_SOURCE_MIRRORS=()
# PKGMK_SOURCE_DIR="$PWD"
#
# Copyright (c) 2000-2005 Per Liden
# Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+#
+# Patches for crosscompilation by Jose V Beneyto <sepen@crux.nu>
+# (CRUX-ARM System Team <crux-arm@mikeux.dyndns.org>)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
find . -type f -printf "%P\n" | $FILTER | while read FILE; do
case $(file -b "$FILE") in
*ELF*executable*not\ stripped)
- strip --strip-all "$FILE"
+ $STRIP_CMD --strip-all "$FILE"
;;
*ELF*shared\ object*not\ stripped)
- strip --strip-unneeded "$FILE"
+ $STRIP_CMD --strip-unneeded "$FILE"
;;
current\ ar\ archive)
- strip --strip-debug "$FILE"
+ $STRIP_CMD --strip-debug "$FILE"
esac
done
}
readonly PKGMK_COMMAND="$0"
readonly PKGMK_ROOT="$PWD"
+STRIP_CMD="strip"
+
PKGMK_CONFFILE="/etc/pkgmk.conf"
PKGMK_PKGFILE="Pkgfile"
PKGMK_FOOTPRINT=".footprint"