LuaJIT: unbreak cross from x86_64.

This commit is contained in:
Juan RP 2015-05-15 07:03:32 +02:00
parent a22103f8ec
commit 4970e6a8fb
1 changed files with 11 additions and 6 deletions

View File

@ -9,16 +9,21 @@ license="MIT"
distfiles="http://luajit.org/download/$pkgname-$version.tar.gz"
checksum=620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d
if [ "$XBPS_MACHINE" = "x86_64" -a "$CROSS_BUILD" ]; then
hostmakedepends="cross-i686-pc-linux-gnu glibc-32bit"
_cross_cc="HOST_CC=i686-pc-linux-gnu-gcc"
else
_cross_cc="HOST_CC=cc"
if [ "$XBPS_MACHINE" = "x86_64" ]; then
hostmakedepends="gcc-multilib"
fi
do_build() {
local _cflags=$CFLAGS
local _ldflags=$LDFLAGS
local _cross_cc
if [ "$XBPS_MACHINE" = "x86_64" ]; then
_cross_cc="cc -m32"
else
_cross_cc=cc
fi
unset CFLAGS LDFLAGS
make ${makejobs} \
PREFIX=/usr \
@ -26,7 +31,7 @@ do_build() {
TARGET_CFLAGS="$_cflags" \
TARGET_LDFLAGS="$_ldflags" \
TARGET_STRIP=: \
$_cross_cc
HOST_CC="$_cross_cc"
}
do_install() {