The driver resets the PIC / PIE flags to false if compiling for kernel/kext considering the OS and its version. From ParsePICArgs():
if (KernelOrKext && ((!Triple.isiOS() || Triple.isOSVersionLT(6)) && !Triple.isWatchOS())) PIC = PIE = false;
The condition for adding the +long-calls ARM feature in getARMTargetFeatures() is exactly the same.
Since +long-calls is not applicable for PIC, both conditions should be kept synchronized, otherwise one can get not working binaries.
This patch suggests to control the +long-calls option based on whether the code is PIC or not, which is a more natural way of doing this.