mardi 1 septembre 2015

Xcode: how to build for older Intel processors (i5, Core 2 Duo) on i7

My is built using the Xcode (6 and 6.4), on OSX 10.9 and 10.10, when using llvm (6.1) and C++11. The SDK is 10.10, the target OSX is 10.7,

The crash is very very early on when the C runtime is loading my application binary:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.ReconInstruments.UplinkDesktop  0x000000010cd10e7a _GLOBAL__I_a + 10
1   dyld                            0x00007fff61fd3ceb    ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 265
2   dyld                            0x00007fff61fd3e78 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
3   dyld                            0x00007fff61fd0871 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, 

This is before any of my application code. The crash does not occur on the build machine (i7 CPU). Crashes occur on i5 and Core 2 Duo machines. I suspect that an extended (CPU specific) instruction is creating the crash on load.

I am also using homebrew: libmtp, libusb, libusb-compat, cryptopp, curl (with c-ares, openssl, nghttp2), boost. I have specified C++11 where necessary. I am statically linking to these libraries.

I have tried to use otool -tV on all libraries, the final binary, etc to find SSE instructions (grep SSE) to no avail.

I have tried to set the Xcode LLVM build setting "Enable Additional Vector Extensions" to "platform" and "SSE3" to no avail.

Are there other tools I can should use to narrow down the offending instruction?

Aucun commentaire:

Enregistrer un commentaire