Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCC 4.0, 4.2 and LLVM ABI Compatibility

Are the three main compiler flavors supported by Xcode (gcc 4.0, 4.2, and llvm) binary-compatible with one another? What kind of gotchas and corner cases should I be aware of when bringing a multi-library project up to speed with the most recent Xcode tools?

like image 843
fbrereto Avatar asked Sep 08 '10 16:09

fbrereto


2 Answers

Clang is ABI-compatible with code generated by gcc. Clang also includes experimental support for some newer Objective-C ABIs, but compiling for the newer ABI requires flags, and generated code can be mixed with GCC-generated code anyway.

like image 109
mipadi Avatar answered Oct 12 '22 02:10

mipadi


A minor gotcha is that if you want to compile PowerPC code that will run on a G3, you must use GCC 4.0.

like image 33
JWWalker Avatar answered Oct 12 '22 02:10

JWWalker