Using Xcode 4 to create Universal binary

I've used this hack to restore PPC support to Xcode 4.

However, every time I tried to create a universal binary, it would just create an Intel binary. After a lot of experimentation with parameters, I think I found the solution.

I had to set the Architectures and the Valid Architectures settings to ppc i386 x86_64

It then seems I have to explicitly set the compiler version to GCC 4.2, rather than LLVM GCC 4.2 which it defaults to.

So my question is, are there any implications to doing this?


I don't think there is any implications by doing this:

  • Architectures and Valid Architectures only control the binaries generated as well as the resulting fat binary. They are mainly arch flags.
  • selecting GCC 4.2 instead of LLVM GCC 4.2 is not necessary in my opinion; there are only few cases where the LLVM GCC 4.2 does not match the GCC 4.2 features.
  • 链接地址: http://www.djcxy.com/p/35378.html

    上一篇: 编译时Xcode总线错误

    下一篇: 使用Xcode 4创建通用二进制文件