From 4970e6a8fb5d321f2e72e9c60f025efd8f202579 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 15 May 2015 07:03:32 +0200 Subject: [PATCH] LuaJIT: unbreak cross from x86_64. --- srcpkgs/LuaJIT/template | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/srcpkgs/LuaJIT/template b/srcpkgs/LuaJIT/template index c598d84ba41..011a1620772 100644 --- a/srcpkgs/LuaJIT/template +++ b/srcpkgs/LuaJIT/template @@ -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() {