lua-users home
lua-l archive

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



* On 2008-03-05 Leo Razoumov <slonik.az@gmail.com> wrote  :

> On 3/4/08, John Hein <jhein@timing.com> wrote:
> > 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.
> >
> 
> What's wrong with setting "AR=arm-ar rcu" in the Makefile?

Technically is not wrong, but it is convention to use variables like CC,
AR, LD, STRIP, etc. to point to the toolchain binaries so these can be
overridden when running the Makefile. For example:

 $ make CC=mips-linux-gcc AR=mips-linux-ar 

or even better, like was suggested in an earlier post, adding
the rules to Lua's makefiles to allow something like

 $ make CROSS=mips-linux- 

The flags to pass to these binaries are usually set in CFLAGS, LDFLAGS,
ARFLAGS, etc, since those usually need not be changed when using a
crosscompiler.


-- 
:wq
^X^Cy^K^X^C^C^C^C