(please keep these discussions on-list for the benefit of others)<div><br></div><div>As long as you build the ARM back-end for LLVM and have an ARM sysroot on your x86 machine, you can use Clang on the x86 machine to compile ARM binaries. I've only played around with this a few times, but I was able to build hard-float ARM binaries on an x64 Linux host and run them on a Panda Board running Arch Linux.</div>
<div><br></div><div>You can try something like:</div><div>$ clang -ccc-host-triple armv7l-unknown-linux-gnueabihf -mfloat-abi=hard -integrated-as <file>.c</div><div><br></div><div>This worked for my simple cases. If you need C++, you'll have to obtain an ARM libstdc++ and probably use -sysroot to specify the system include/lib paths. This goes beyond my experience for this setup, however, so someone else will have to chime in here.</div>
<div><br><div class="gmail_quote">On Wed, Jun 6, 2012 at 9:06 AM, Yuan-Yi Chang <span dir="ltr"><<a href="mailto:changyy.csie@gmail.com" target="_blank">changyy.csie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Yes. </div><div><br></div><div>Building the ARM binaries from a x86 host is more convenient and fast. Is there any docs? It's interesting to build the LLVM for Android ICS on Pandaboard, too.</div><div><br></div>
<div>
Thanks, </div><span class="HOEnZb"><font color="#888888"><div>Yuan-Yi Chang</div></font></span><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote">2012/6/6 Justin Holewinski <span dir="ltr"><<a href="mailto:justin.holewinski@gmail.com" target="_blank">justin.holewinski@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><div>On Tue, Jun 5, 2012 at 11:05 PM, Yuan-Yi Chang <span dir="ltr"><<a href="mailto:changyy.csie@gmail.com" target="_blank">changyy.csie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm new to LLVM World! I wanna build LLVM for Pandaboard Platform. Is there<br>
any better method without building on pandaboard?<br>
<br>
current status:<br>
<br>
Device: Pandaboard ES<br>
OS: ubuntu-12.04-preinstalled-server-armhf+omap4<br>
SD: Transcend SDHC Class10 8GB<br>
<br>
1.Install Ubuntu 12.04 server on Pandaboard<br>
(ubuntu-12.04-preinstalled-server-armhf+omap4.img.gz)<br>
2.Initial building enviroments<br>
- $ sudp apt-get update && sudo apt-get upgrade<br>
- $ sudo apt-get install subversion gcc g++ make cmake<br>
3.Get LLVM/Clang source code<br>
- $ svn co <a href="http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/final/llvm-src/" target="_blank">http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/final/<br>
llvm-src/</a><br>
- $ cd ~/llvm-src/tools/<br>
- $ svn co <a href="http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_31/final/" target="_blank">http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_31/final/</a><br>
clang<br>
- $ cd ~/llvm-src/projects/<br>
- $ svn co<br>
<a href="http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_31/final/compiler-rt" target="_blank">http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_31/final/<br>
compiler-rt</a><br>
4. Build it<br>
- $ mkdir ~/bulid && cd ~/build && cmake<br>
-DCMAKE_INSTALL_PREFIX:PATH=$HOME/out ../llvm-src<br>
- $ make -j2 (about 120 mins)<br>
- $ make install<br>
5. Testing<br>
- $ ~/out/bin/llvm-config<br>
llvm-config --version<br>
3.1svn<br>
- $ ~/out/bin/clang --version<br>
clang version 3.1 (tags/RELEASE_31/final 158045)<br>
Target: armv7l-unknown-linux-gnueabihf<br>
Thread model: posix<br></blockquote><div><br></div></div></div><div>I'm not really sure what you're asking. You seem to have it built and running on the PandaBoard. Are you wanting to build ARM binaries from an x86 host?</div>
<div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best Regards,<br>
Yuan-Yi Chang<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Build-LLVM-Clang-for-Pandaboard-tp4024304.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Build-LLVM-Clang-for-Pandaboard-tp4024304.html</a><br>
Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>
</font></span></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>
</div>