The lang/lua port has a Makefile in the distribution that _almost_ works for cross compiles (e.g., to arm). But AR is defined as 'AR=ar rcu'. Normally one overrides compile tools (CC, AR, RANLIB, etc.) with cross versions of the tool (e.g., CC=arm-cc or similar). It's hard to override AR for lua since its definition includes the flags to AR. This is a deviation from the way things are normally done and it breaks when one passes in AR=arm-ar (since the flags will be missing when it comes time to run $(AR)). see also discussion at http://marc.info/?l=lua-l&m=120468996914376&w=2 The reaction to the patch shown in the thread (and below) was all positive (although there was some digression into conversation about cross building in general and whether lua should use autoconf). But I don't know if it made it in to lua's repo since that is private. Fix: Add following patch file to lang/lua port. With this patch I can cross build and use lua (tested on arm). [Note: this is still needed in the most recent lua port, 5.1.3, that was released in Jan 2008] How-To-Repeat: Build cross tools for you favorite platform. Try to cross build lua with the common technique of overriding the build tools, like so (just make sym links named foo-* to the real tools for purposes of testing)... make MAKE_ARGS='CC=foo-cc AR=foo-ar' MAKE_ENV=STRIPBIN=foo-strip See it fail when it gets to the ar line... . . . foo-cc -O2 -fno-strict-aliasing -pipe -O2 -Wall -DLUA_USE_POSIX -DLUA_USE_DLOPEN -c loadlib.c foo-cc -O2 -fno-strict-aliasing -pipe -O2 -Wall -DLUA_USE_POSIX -DLUA_USE_DLOPEN -c linit.c foo-ar liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o foo-ar: illegal option -- . Usage: foo-ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file... . . .
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
State Changed From-To: feedback->open Feedback timeout.
Class Changed From-To: change-request->sw-bug Fix PR class.
Can a committer pull the trigger on this, please?
alepulver 2008-08-10 15:17:49 UTC FreeBSD ports repository Added files: lang/lua/files patch-src-Makefile Log: - Split AR parameters to ARFLAGS variable to allow redefining AR for cross-compilation. PR: ports/121834 Submitted by: John Hein <jhein@timing.com> Approved by: maintainer (timeout) Revision Changes Path 1.1 +21 -0 ports/lang/lua/files/patch-src-Makefile (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!