32

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 of armv7 armv7s.

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

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

No armv7s. Am I missing something?

1
  • 2
    My best guess is that lipo doesn't know about armv7s. Perhaps path/to/xcode/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo will work better?
    – tc.
    Sep 23, 2012 at 3:34

3 Answers 3

62

Use XCode's lipo:

xcrun -sdk iphoneos lipo
2
  • 1
    Looks like it should be: xcrun -sdk iphoneos lipo -info myLibrary.a
    – Paul Solt
    Sep 17, 2013 at 15:09
  • Thanks! This did the trick for me. The "normal" lipo identifies armv7s as (cputype (12) cpusubtype (11)). So if you try to run that lipo with the "-thin armv7s" an error will be thrown.
    – runamok
    Oct 10, 2013 at 20:34
17

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 file command.

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.

1

lipo does not have a definition for armv7s and that is why you cannot see the name but only the cpu type and subtype. So this fat binary is ok, just we may have to wait until apple updates its tools if we want to mess with the new architecture manually (for example right now there is no way to merge manually armv7s slim binary into a fat binary).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.