I did some more investigating and updated my blog post. The problem is
caused by a bug in libttool, but it is triggered by the all_load flag.
Without the all_load flag, there is no bug. all_load affects the
application - not the static libraries themselves. The static
libraries don't need it as they are not actually linked - just stuffed
together.
So, my demunging solution will work but its a hack. A better solution
would be to avoid the all_load problem altogether. all_load is
required because of this bug:
http://developer.apple.com/mac/library/qa/qa2006/qa1490.html:
IMPORTANT: For 64-bit and iPhone OS applications, there is a linker
bug that prevents -ObjC from loading objects files from static
libraries that contain only categories and no classes. The workaround
is to use the -all_load or -force_load flags.
Bugs that cause bugs. I would suggest that a better workaround that
works (I've just tried it) is to put dummy classes (@interface foo1
@end @implementation foo1 @end will work) into every file (there's
about 20) that implement category-only code. This causes them to be
loaded successfully by the -ObjC flag without using all_load. And this
allows us to have arm6 and arm7 binaries. Better yet, do it with a
#define so it can be turned off when Apple fix the bug (either one).
Jamie
On Jun 10, 11:51 pm, cloudguy <
jamiebri...@gmail.com> wrote:
> Ok, this is a bug in libtool -arch_only. The arch_only flag doesn't
> work. See my posthttp://
blog.binaryfinery.com/?p=225
>
> I've got a fork of three20 and here is the changelist for the hack:
http://github.com/jamiebriant/three20/commit/57812051ac83df5d84c1f358...