mondi
2014-Sep-05 11:32 UTC
[LLVMdev] '___ltsf2' could not be resolved - iOS/ARM cross compile
Hi there, I’m building llvm for my iOS devices, and all seems to work well, until I try to execute the results: LLVM ERROR: Program used external function '___ltsf2' which could not be resolved! This appears to be part of compiler-rt which as far as I can see should be built / linked automatically when installed correctly? Am I missing something obvious? Thanks, .m
Tim Northover
2014-Sep-05 12:11 UTC
[LLVMdev] '___ltsf2' could not be resolved - iOS/ARM cross compile
On 5 September 2014 12:32, mondi <mondi at dyskinetic.com> wrote:> I’m building llvm for my iOS devices, and all seems to work well, until I try to execute the results: > > LLVM ERROR: Program used external function '___ltsf2' which could not be resolved!That's the software floating-point less-than operator. It shouldn't be used if you're compiling for iOS since there are real instructions to do the job. If this is for a custom front-end, you're going to have to set the triple and CPU features manually. You might get away with just setting the triple to something like "thumbv7s-apple-ios7.0", at least for initial experiments. But longer term, there are quite a few subtleties you're likely to have to contend with. Cheers. Tim.
mondi
2014-Sep-05 12:35 UTC
[LLVMdev] '___ltsf2' could not be resolved - iOS/ARM cross compile
It is indeed for a custom frontend, and given that I’m compiling with the very generic “arm-apple-darwin” at the moment, that makes a lot of sense. I’ll try some more specific targets and see what difference it makes Thanks. .m> On 05 Sep 2014, at 14:11, Tim Northover <t.p.northover at gmail.com> wrote: > > On 5 September 2014 12:32, mondi <mondi at dyskinetic.com> wrote: >> I’m building llvm for my iOS devices, and all seems to work well, until I try to execute the results: >> >> LLVM ERROR: Program used external function '___ltsf2' which could not be resolved! > > That's the software floating-point less-than operator. It shouldn't be > used if you're compiling for iOS since there are real instructions to > do the job. > > If this is for a custom front-end, you're going to have to set the > triple and CPU features manually. You might get away with just setting > the triple to something like "thumbv7s-apple-ios7.0", at least for > initial experiments. But longer term, there are quite a few subtleties > you're likely to have to contend with. > > Cheers. > > Tim.