[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?

Journeyer J. Joh oosaprogrammer at gmail.com
Mon Jun 18 04:40:14 PDT 2012


Hi,  Gergö

Cross compiling with Clang/llvm is much easier than with llvm-gcc or gcc!

Thank you very much!!
Though I am so much new to llvm that I can't prove your answer right way,
my friend verified your answer.

Thank you very much.

Sincerely
Journeyer

(PS. Sorry I am resending same email because I sent only to you. I want to
say thank you on the mail list.)


2012/6/18 Gergö Barany <gergo at complang.tuwien.ac.at>

> On Sat, Jun 16, 2012 at 20:20:23 +0900, Journeyer J. Joh wrote:
> > I wonder if llvm/Clang can compile C or C++ for ARM from on x86.
>
> Yes. I use
>  clang -emit-llvm -ccc-host-triple arm-unknown-linux-gnu -I
> /..arm../include/
> to generate LLVM bitcode files for ARM. llc then automagically knows to
> generate ARM assembly, and ARM binutils take it from there.
>
> > If the cross compiling is supported, is there any documentation on how to
> > do it?
>
> Dunno. Last time I looked, the documentation of clang's command line flags
> disagreed with reality, and the -ccc-host-triple flag wasn't documented
> anywhere. This might have changed in the meantime.
>
> --
> Gergö Barany, research assistant
> gergo at complang.tuwien.ac.at
> Institute of Computer Languages
> http://www.complang.tuwien.ac.at/gergo/
> Vienna University of Technology                       Tel:
> +43-1-58801-58522
> Argentinierstrasse 8/E185, 1040 Wien, Austria         Fax:
> +43-1-58801-18598
>



-- 
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120618/12efcb9c/attachment.html>


More information about the llvm-dev mailing list