ld: -no_pie and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together error

1.5k views Asked by At

When I try to execute my app from XCode 7 on my iPhone 4 I get the ld error: ld: -no_pie and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together

What is that -no_pie, and how to fix the problem, without of course disabling bitcode?

When I compile for the iPhone 6 simulator, everything goes without this issue altogether.

2

There are 2 answers

0
Fabrizio Bartolomucci On BEST ANSWER

The issue was due to the Generate position-dependent code configuration to YES in the PROJECT settings, which apparently overrode the configuration in the targets.

4
Daij-Djan On

no_pie makes clang generate position-independent code AFAICS. try to specify -pie to the linker

see also: Can I make clang generate absolute addresses for function pointers?