lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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
-AR= ar rcu
+AR= ar
 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)