Mac OS X cross compile on Linux
必要なもの
方法1 - precompiled packageを利用
あらかじめLinux/x86用にビルドされたGCC(gcc-4.0.1 / Apple gcc 5247)があるのでそれを利用する。
ここから入手可能。freeverb3vst@sourceforge.jpでミラーしている。
/opt/mac/SDKs/MacOSX10.4u.sdkにAppleから入手したSDKを展開するだけでできる。
Macといっても所詮UNIX + (ObjectiveC + NeXTSTEP Framework)の塊だから、適宜リンクしてあげれば良い。Freeverb3では、この方法で
32bit Mac用のバイナリを作っているが、64bit版は下の方法を使っている。
方法2 - odcctoolsとgccをビルド
くわしくはapple-darwin9.txtを参照してください。
odcctoolsをビルド
odcctools-9.2-ld-r280.tgzにパッチ群をあてたものがodcctools-9.2-ld-r280_patched.tgz。x86/x64/ppc/ppc64の4種類を作れるが、
全部別のディレクトリprefixにインストールするのが無難。x86/ppcは共存できそう。以下は、x64/ppc64の二つのビルドの例。
aptitude install subversion #if it is not installed already
mkdir ~/svn #store our repositories here, change according to taste
cd ~/svn
svn checkout http://svn.macosforge.org/repository/odcctools/trunk/ odcctools
./configure --prefix=/opt/mac/x64 --target=x86_64-apple-darwin9 --with-sysroot=/opt/mac/SDKs/MacOSX10.5.sdk --enable-ld64
make; make install
./configure --prefix=/opt/mac/p64 --target=powerpc64-apple-darwin9 --with-sysroot=/opt/mac/SDKs/MacOSX10.4u.sdk --enable-ld64
make; make install
Apple gccをビルド
gcc-workなりをつくってビルドしたほうが、ゴミを消しやすい。
../gcc-5490/configure --prefix=/opt/mac/x64 --disable-checking --enable-languages=c,objc,c++,obj-c++ \
--with-as=/opt/mac/x64/bin/x86_64-apple-darwin9-as --with-ld=/opt/mac/x64/bin/x86_64-apple-darwin9-ld64 \
--target=x86_64-apple-darwin9 --with-sysroot=/opt/mac/SDKs/MacOSX10.5.sdk --enable-static --enable-shared --disable-nls --disable-multilib
make; make install
../gcc-5490/configure --prefix=/opt/mac/p64 --disable-checking --enable-languages=c,objc,c++,obj-c++ \
--with-as=/opt/mac/p64/bin/powerpc64-apple-darwin9-as --with-ld=/opt/mac/p64/bin/powerpc64-apple-darwin9-ld64 \
--target=powerpc64-apple-darwin9 --with-sysroot=/opt/mac/SDKs/MacOSX10.4u.sdk --enable-static --enable-shared --disable-nls --disable-multilib
make; make install
What happened to Christopher Michael Pilato?
Is he gone?
Is he gone for good?
Is he gone for better?
Is he gone for best?
Is he gone forever?
Will he return?
Who is Christopher Michael Pilato, anyway?
Shlomi Fish
-- Shlomi Fish
-- Adapted from an IRC Monologue
No violence, gentlemen -- no violence, I beg of you! Consider the furniture!
-- Sherlock Holmes
Powered by UNIX fortune(6)
[
Main Page ]