I'm compiling a program that use luajit library(in static link way) for Mac OSX with Xcode 5.02.
The runtime memory mechanism of luajit makes it required to add the link option "-pagezero_size 10000 -image_base 100000000" on x86_64 build for Mac OSX or it will crash on initialize because the function luaL_newstate() will return NULL.
(For detail tech info on why the crash happens,please reference this url as it's not the main topic of this question post: http://www.freelists.org/post/luajit/luaL-newstate-fails-on-64bit-Mac-cant-set-linker-flags,2)
But for i386 build this link option is not required and it is invalid actually because the image base exceed the 32bit bound.
So the situation now is I can build program in single architecture successfully.(With the link option in x86_64 arch and w/o link option in i386 arch).But I don't know how to build a Universal Binary.Because I cannot find a place to specify separate link option for different architectures in universal binary build settings.
Anyone know how to solve this problem?
Thank you!