I'm running into some problems while trying to provide legacy support to iPhone 3G and iPod Touch 2G running iOS 4.2.1.
I'm working with Snow Leopard and Xcode 4.2, SDK 5.0. Everything works fine for newer devices but it seems that older ones don't like binary built by the IDE. I mostly find strange bugs eg:
Strangely these things disappear if I build with debug scheme, even if I tried to change every setting so that debug is as release.
Is there any particular trick? Can I use base plain GCC anymore on Xcode 4.2?
Also if I'm able to do GCC, how can I specify a different compiler for a different architecture? (I added armv6 to be able to build for old devices too)
I managed to specify per architecture optimization settings while keeping GCC as the compiler: ARMv6 is compiled with -O0
while ARMv7 is compiled with -O2
. This fixed everything!