Compile Library for armv7s - cputype (12) and cpusubtype (11)

来源:互联网 发布:淘宝影响二次销售举证 编辑:程序博客网 时间:2024/04/28 10:24

http://stackoverflow.com/questions/12549489/compile-library-for-armv7s-cputype-12-and-cpusubtype-11


I'm a developer of a third party library and I'd like to recompile my library for armv7s, but I seem to have issues.

I updated xcode to 4.5. I updated the project and the related targets to have valid architectures ofarmv7 armv7s.

However, when I run file or lipo -info, it lists

  • i386
  • armv7
  • (cputype (12) cpusubtype (11))

No armv7s. Am I missing something?


Use XCode's lipo:

xcrun -sdk iphoneos lipo

Apparently, (cputype (12) cpusubtype (11)) is another nomenclature for armv7s.

You can refer more here: http://www.galloway.me.uk/2012/09/hacking-up-an-armv7s-library/

The above blog also describes a method for making some libraries armv7s build compatible. The description of above is near the end of the article where he explains about the output from filecommand.

To quote a part of it:

Inside this header (called a Mach-O header) is a field for the CPU type and the CPU subtype. ARM is CPU type 12, armv7 is CPU subtype 9 and armv7s is CPU subtype 11.