From 9433d468d64fa4c214d108deeeb9a99d21e666d7 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 7 Feb 2012 17:31:14 +0100 Subject: [PATCH] luajit: evil change to get luajit x86_32 cross compiling in a x86_64 host - needs sanitization --- lua/luajit/luajit.conf | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lua/luajit/luajit.conf b/lua/luajit/luajit.conf index 87d5c1153..c8952dc4e 100644 --- a/lua/luajit/luajit.conf +++ b/lua/luajit/luajit.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../luajit/luajit.conf -# Copyright (C) 2011 The OpenSDE Project +# Copyright (C) 2011 - 2012 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -27,12 +27,22 @@ var_append patchfiles " " "$localpatches" # for binary distributions it is recommended to use the special target for an # amalgamated build which compiles the LuaJIT core as one huge C file and # allows GCC to generate faster and shorter code -var_append makeopt ' ' "amalg" +makeopt='amalg' # By default, modules are only searched under the prefix /usr/local. You can # add an extra prefix to the search paths by appending the PREFIX option. var_append makeopt ' ' "PREFIX=/$prefix" -var_append makeinstopt ' ' "PREFIX=/$prefix" + +if ! atstage native; then + var_append makeopt ' ' 'TARGET_SYS=Linux' + # FIXME: don't hardcode HOST_CC this way + var_append makeopt ' ' "HOST_CC='$HOST_CC -m32'" + var_append makeopt ' ' "CROSS=$arch_target-" + + var_append makeopt ' ' "DESTDIR=$root" +fi + +makeinstopt="${makeopt/amalg/install}" # beta releases only install the LuaJIT executable under the versioned name hook_add postmake 5 "ln -sf luajit-$ver $root$bindir/luajit"