[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [patch] help for cross compiling lua
- From: John Hein <jhein@...>
- Date: Tue, 4 Mar 2008 21:05:41 -0700
A classic way to cross compile tools is override
things like CC and RANLIB and AR. When trying to build
lua for an arm-based platform, I employed this technique.
Unfortunately the src/Makefile has 'AR= ar rcu'. So when one
overrides AR (with the cross platform version, arm-ar), building
liblua.a fails because the 'rcu' is missing.
I'd like to submit the following patch to fix that issue.
If there is a better place to submit this, please let me know.
--- src/Makefile.orig Sat Jan 19 12:37:58 2008
+++ src/Makefile Tue Mar 4 20:51:52 2008
@@ -9,7 +9,8 @@
CC= gcc
CFLAGS= -O2 -Wall $(MYCFLAGS)
-AR= ar rcu
+AR= ar
+ARFLAGS= rcu
RANLIB= ranlib
RM= rm -f
LIBS= -lm $(MYLIBS)
@@ -48,7 +49,7 @@
a: $(ALL_A)
$(LUA_A): $(CORE_O) $(LIB_O)
- $(AR) $@ $?
+ $(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@
$(LUA_T): $(LUA_O) $(LUA_A)