Hello,
I am now cross-compiling orbit and its dependent rocks.
Cross compiling those rocks usually can be accomplished by 2 teps.
1. Changing the install prefix
2. Specifying cross compile toolchain
I did step 1. via luarocks configure script as shown below.
./configure --prefix=/home/gc/rootfs_luarocks --rocks-tree=/home/gc/rootfs_orbit --with-lua-include=/home/gc/rootfs_orbit/include --with-lua-lib=/home/gc/rootfs_orbit/lib
And now I need to find a way to specify cross tool chain into the build system.
When I didn't use luarocks I was able to do this directly on the Makefils or config files for each rocks. But Now I use luarocks. When it comes to luarocks, most build variables seem to be applied via rockspec file.
So I tried this way below for luasocket rock.
20 build = {
21 type = "make",
22 build_variables = {
23 CC = "/opt/arm-2007q1/bin/arm-none-linux-gnueabi-gcc",
24 CFLAGS = "$(CFLAGS) -DLUASOCKET_DEBUG -I$(LUA_INCDIR)",
25 LDFLAGS = "$(LIBFLAG) -O -fpic",
26 LD = "$(CC)"
27 },
Please note I specified CC and LD there.
But this doesn't produce arm library.
Question #1. How can I specify cross toolchain (macro variables like CC, LD, ..)?
Question #2. Is there any know method to cross compile lua rocks?
I think I need to use lua JIT compiler natively installed in the system when I cross compile lua rocks. But After I cross compiled all rocks, I need to cross compile lua JIT compiler also.
Question #3. Am I wrong with this thought?
Thank you very much in advance.
Sincerely
Journeyer J. Joh
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------