[LLVMdev] Compile code for arm
amir.yazdanbakhsh at gmail.com
Sat Dec 8 11:52:11 PST 2012
Thanks for your help. But I got this warning which it seems it doesn't use
"clang: warning: argument unused during compilation: '-triple
School of Electrical and Computer Engineering
University of Wisconsin-Madison
E-mail: yazdanbakhsh at wisc.edu
On Sat, Dec 8, 2012 at 1:43 PM, Renato Golin <rengolin at systemcall.org>wrote:
> On 8 December 2012 19:10, Amir Yazdanbakhsh <amir.yazdanbakhsh at gmail.com>
> > Hi,
> > I've installed clang version 3.3 on ubuntu.
> > I want to cross-compile a C code into ARM (preferably) ARMv7. I want to
> > both assembly code and binary. Can anyone help me what are the steps
> > should I take?
> clang -triple arm-none-eabi (or many other variations including
> 'armv5', 'armv7a', 'linux', 'gnueabi', etc).
> There are other options, like -mcpu, -mfpu, -march, -mthumb that you
> can also tune. I'm not sure there is a list of all available options,
> but since you have the source, you can look into ToolChain.cpp or
> Tools.cpp in Clang/lib/Driver and see for yourself all the available
> > Second question, Is there anyway to tell compiler not to use any
> > Thumb/NEON/VFP instructions?
> Using the same flags, you can tune at your leisure. The combination of
> compiler flags might not be the most straightforward, as this is
> somewhat a messy region. I advise you to search the list and try a bit
> for yourself, always checking on clang's source what's available.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev