Xcode 4.0.2 で PowerPC バイナリを作る

in Uncategorized

Macの統合開発環境Xcodeはバージョン4になってPowerPCバイナリの生成をサポートしなくなりました。 それでも以下の設定をすれば生成させることができるようになったのでメモします。

(LLVM GCC使用を前提)PPCコンパイル環境をシンボリックリンクする。

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /Developer/usr/libexec/gcc/darwin
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /usr/libexec/gcc/darwin
sudo ln -s /Developer/usr/bin/powerpc-apple-darwin10-gcc-4.2.1 /Developer/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2
sudo ln -s /Developer/usr/bin/powerpc-apple-darwin10-g++-4.2.1 /Developer/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-g++-4.2

Xcodeの当該プロジェクトのBuild Settingsの以下の値にppcを追加する。

Valid Architectures
Architectures

ちなみにできたユニバーサルアプリケーションから特定のアーキテクチャーのみのアプリケーションを作るのは簡単で

ditto --arch i386 --arch x86_64 Original.app New.app
などとすればよいようです。

Leave a Reply

*