[vlc-devel] a pitfall when cross-compiling win32 build on 64bit machine
funman at videolan.org
Wed Dec 14 16:25:10 CET 2011
Le Thu, 15 Dec 2011 00:20:02 +0900,
Naohiro KORIYAMA <nkoriyama at gmail.com> a écrit :
> 2011/12/15 Rafaël Carré <funman at videolan.org>:
> > Le Wed, 14 Dec 2011 09:05:39 +0100,
> > Rémi Denis-Courmont <remi at remlab.net> a écrit :
> >> Naohiro-san hello,
> >> On Wed, 14 Dec 2011 15:48:54 +0900, Naohiro KORIYAMA <nkoriyama at gmail.com>
> >> wrote:
> >> > I compile win32 build on OS X Lion.
> >> >
> >> > First, it seemed fine, but lua scripts didn't run at all.
> >> > I installed lua in /usr/local/bin, and it was built as 64bit
> >> application.
> >> > And, I found the following in the LUAC man page:
> >> > The binary files created by luac are portable only among architectures
> >> > with the same word size and byte order.
> >> Is that so? I thought it was only byte order.
> > lua wiki says it doesn't depend on byte order (it's not in sync with
> > luac manpage at least)
> Endianness is checked at header loading.
> int x=1;
> *h++=(char)*(char*)&x; /* endianness */
We could see what luac checks exactly and add those checks to
configure.ac when cross compiling.
gcc has macros for byte order: __BYTE_ORDER__
and __SIZEOF_INT__ etc so we can check them when cross compiling
More information about the vlc-devel