[ Main Page ]

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
Ally McBeal as a Software House:

Richard Fish - the methodology gury, usually does not actually write code. But
he does stress doing things the right way (not in PHB sense, but in hacker
sense).

Ally McBeal - the brilliant female hacker. Her code is mixture of brilliancy -
both in getting the job done, and in the quality of bugs which go into it.

"Biscuit" - would be the type who does not think twice of embedding a string
representing a Scheme script into an assembly language device driver, and
invoking Guile from it.

Other participants - left as homework.

    -- Omer Zak
    -- Hackers-IL Message No. 2819 ( http://tech.groups.yahoo.com/group/hackers-il/message/2819 )

It could be that in Java's case I'm mistaken. It could be that a language
promoted by one big company to undermine another, designed by a committee for
a "mainstream" audience, hyped to the skies, and beloved of the DoD [=
"Department of Defense"], happens nonetheless to be a clean, beautiful,
powerful language that I would love programming in. It could be, but it seems
very unlikely.

Paul Graham
"Java's Cover" - http://www.paulgraham.com/javacover.html

    -- Paul Graham
    -- Java's Cover ( http://www.paulgraham.com/javacover.html )


Powered by UNIX fortune(6)
[ Main Page ]