<div dir="ltr">Cool, I'll try that. I've so far only tested builds in the Android emulator but I may beable to use a spare android arm device around <a href="http://here.to">here.to</a> test with. The native build I can do right away. I'll post back when I've done the tests (may be awhile though).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 14, 2014 at 7:28 PM, Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 9/13/14 8:14 PM, Jeffrey Brusseau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ok, here's my new patch for making LLVM/Clang build using the NDK toolchain.<br>
This time my configuration looked like:<br>
../llvm/configure --host=arm-linux-androideabi --build=i686-pc-linux-gnu<br>
--prefix=/home/bobajeff/<u></u>android-ext<br>
<br>
The configure script didn't seem to detect that I was cross-compiling unless I<br>
used the host and build flags. It didn't seem like the prefix flag would make it<br>
pick up the NDK compiler either.<br>
</blockquote></span>
'--prefix' only tells configure where you'd like `make install` to copy the build products to. Yes, '--build', '--target', and '--host' are the correct way to specify that you're cross compiling.<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Anyway I ran:<br>
make ENABLE_OPTIMIZED=1<br>
<br>
Everything built fine.<br>
<br>
Then I ran:<br>
make ENABLE_OPTIMIZED=1 check-all<br>
<br>
I got "Could not find llvm-config in<br>
/home/bobajeff/Downloads/<u></u>LLVM4Android/build/Release+<u></u>Asserts/bin"<br>
I looked and it's in there. I think it just tried to run it but because it's a<br>
Arm binary and my system is x86 it couldn't.<br>
</blockquote></span>
I'd only expect `make check-all` to work on 'host' because it has to run things like llc, clang, and FileCheck which are build to run on '--host'.<br>
<br>
In your case, it probably makes sense to keep two builds of the tree around: one for the cross build, and another where build and host are both i686-pc-linux-gnu.  Then you can write patches for the cross build case, test them on your device, and then apply the patches to the other tree, build that, and test there to make sure you haven't broken any of the tests for other platforms.<br>
<br>
<br>
Cheers,<br>
<br>
Jon<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What do you think?<br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Jon Roelofs<br>
<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a><br>
CodeSourcery / Mentor Embedded<br>
</div></div></blockquote></div><br></div>