lua-users home
lua-l archive

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


On Fri, Oct 16, 2009 at 01:54, Craig Yoshioka <craigyk@me.com> wrote:
> Thanks, using -m32 worked.  I don't know if there is a better way to do it,
> but I made two changes in the Makefiles
> First I added macosx10.6 as a platform (to Makefile and src/Makefile), then
> I added to src/Makefile:
>
> macosx10.6:
>        $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX -m32"
>
> and changed line 90 in src/Makefile to:
>        $(CC) $(MYCFLAGS) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
> from:
>        $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
>
> I guess the bad part is the last compilation bit has -DLUA_USE_LINUX being
> passed to it that may break things on other platforms?  Seems to work OK for
> me though.

The Mac OS X way of compiling for a specific architecture is to use
"-arch <arch>", in this case "-arch i386". You can also pass this
argument several times to compile universal binaries (-arch i386 -arch
x86_64), although this is obviously not supported for LuaJIT.

-- 
Anders Bergh