lua-users home
lua-l archive

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


On 04/11/2014 01:11 PM, Dirk Zoller wrote:
Hello All,

we target many platforms with the software that embeds Lua.
For some of them it is more practical to cross compile on another
system than setting up and running the builds on the target.

A limitation I noticed seems to be that compiled Lua bytecode
is not portable. So I have to run at least the luac on a machine
that at least has the same byte-order and wordsize as the target.

This is a bit a pain, as we would otherwise host all compilers
on one big box. Now we keep some extra build systems alive just
for this which we could otherwise retire.

Anybody else struggling with this?
Is a platform independent byte-code desirable?

Cheers,
Dirk

You may look into the last few slides of my talk in Toulouse:
http://www.lua.org/wshop13/Jericke.pdf

In short, you just need to patch ldump.c so it produces bytecode for your target.
--
Thomas