Hi,<div>  I've battled with this now for a good many hours, and I was wondering if someone could point in the right direction. What I want to do is with the kaleidoscope tutorial code, take the IR from a run where I've just done</div>
<div><br></div><div>"</div><div>def test(x) 42.0*x;</div><div>"</div><div><br></div><div>resulting in the file test.ll</div><div><br></div><div>"</div><div><div>; ModuleID = 'my cool jit'</div><div>
<br></div><div>define double @test(double %x) {</div><div>entry:</div><div>  %multmp = fmul double %x, 4.200000e+01          ; <double> [#uses=1]</div><div>  ret double %multmp</div><div>}</div></div><div>"</div>
<div><br></div><div>and the use llvm-ar to compile that test.ll to a test.bc and then compile that to a .S which I can pass to the Android NDK to compile.</div><div><br></div><div>I've tried (to cut a long day short!)</div>
<div>Compiling llvm with the "--target=arm-eabi" and "--target=arm-elf-linux-gnu" options.</div><div>Calling llc with -march=thumb and -march=arm (I'm trying to create a asm file for the android NDK gcc)</div>
<div><br></div><div>I'm able to get the NDK to get close (by using thumb, and manually editing the asm a bit, but it still complains about ___mulfp being undefined.</div><div><br></div><div>So questions:</div><div>Do I have to somehow get LLVM to use the binutils in the NDK?</div>
<div>Do I have to do a full Canadian Cross, and actually host the final thing on the android?</div><div><br></div><div>Oh, I'm currently doing all this on Snow Leopard (but did try Ubunutu), and have tried both LLVM1.6 and LLVM1.7, and I'm using NDKr4</div>
<div><br></div><div>Thoughts?</div><div><br></div><div>Cheers</div><div><br></div><div>Matthew</div><div><br></div>