<div dir="ltr">Thanks for your help. But I got this warning which it seems it doesn't use -triple<div><br></div><div>"clang: warning: argument unused during compilation: '-triple arm-none-eabi' "<br>
</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Best Regards,<br>A. Yazdanbakhsh<br><br><span style="color:rgb(102,102,102)">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>></span><br style="color:rgb(102,102,102)">
<br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">PhD. Student</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">School of Electrical and Computer Engineering</span><br style="color:rgb(102,102,102)">
<span style="color:rgb(102,102,102)">University of Wisconsin-Madison</span><span style="color:rgb(102,102,102)"></span><span style="color:rgb(102,102,102)"></span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">E-mail: </span><a style="color:rgb(102,102,102)" href="mailto:yazdanbakhsh@wisc.edu" target="_blank">yazdanbakhsh@wisc.edu</a><br>
<br><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)"><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</span></div>
</div><br>
<br><br><div class="gmail_quote">On Sat, Dec 8, 2012 at 1:43 PM, Renato Golin <span dir="ltr"><<a href="mailto:rengolin@systemcall.org" target="_blank">rengolin@systemcall.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 8 December 2012 19:10, Amir Yazdanbakhsh <<a href="mailto:amir.yazdanbakhsh@gmail.com">amir.yazdanbakhsh@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I've installed clang version 3.3 on ubuntu.<br>
> I want to cross-compile a C code into ARM (preferably) ARMv7. I want to get<br>
> both assembly code and binary. Can anyone help me what are the steps which<br>
> should I take?<br>
<br>
</div>clang -triple arm-none-eabi (or many other variations including<br>
'armv5', 'armv7a', 'linux', 'gnueabi', etc).<br>
<br>
There are other options, like -mcpu, -mfpu, -march, -mthumb that you<br>
can also tune. I'm not sure there is a list of all available options,<br>
but since you have the source, you can look into ToolChain.cpp or<br>
Tools.cpp in Clang/lib/Driver and see for yourself all the available<br>
options.<br>
<div class="im"><br>
<br>
> Second question, Is there anyway to tell compiler not to use any<br>
> Thumb/NEON/VFP instructions?<br>
<br>
</div>Using the same flags, you can tune at your leisure. The combination of<br>
compiler flags might not be the most straightforward, as this is<br>
somewhat a messy region. I advise you to search the list and try a bit<br>
for yourself, always checking on clang's source what's available.<br>
<br>
cheers,<br>
--renato<br>
</blockquote></div><br></div>