Regarding LLVM compiling flag “-mlong-calls” for “Other C Flags” in XCode.
What does this flag mean? How will it be used? For which purpose will need to enable this flag?
According to the ARM options page for GCC;
Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register. This switch is needed if the target function lies outside of the 64-megabyte addressing range of the offset-based version of subroutine call instruction.
Basically it means that if your binary is small, you'll likely never have a problem with running the default -mno-long-calls and not have to worry about the option.
If the linker gives you the error Relocation truncated to fit: R_ARM_PC24, you've hit the limit of the defaults and need to compile and link your binary using -mlong-calls.