<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
All,<br>
<br>
  I might be getting somewhere based on several questions asked of me
-- I seem to be able to get assembler generated and compiled with code
sourcery's arm-gcc compiler by doing the following:<br>
<br>
clang -ccc-host-triple arm-none-linux-gnueabi main.c -S -o main.s<br>
<br>
which gives me this warning but does generate a main.s<br>
clang: warning: unknown platform, assuming -mfloat-abi=soft<br>
<br>
Then using code sourcery's gcc:<br>
arm-none-linux-gnueabi-gcc main.s<br>
<br>
I get an "a.out" ... which won't work with my simulator just yet but
I'm getting there...<br>
<br>
I now have 2 questions, at the risk of missing something obvious on a
Friday afternoon:<br>
<br>
1) How does one replace the default "gcc" that clang uses for
assembling with another CC compiler? Looking at the options from "clang
--help", it is not obvious<br>
2) How do I reconcile what I believe to be the right target-triplet for
the assembler (from code sourcery) I am using with clang's known
platforms (ie. how do I find out clang's known target-triplets?). <br>
<br>
Interestingly, if I look at what clang does with the target-triplet I
supplied, the underlying clang command reveals -target
armv4t-none-linux-gnueabi... but if I try to specify this instead of
the target-triplet that I used, I still get the same error message
about unknown platform.<br>
<br>
Thanks in advance.<br>
<br>
Dave Mc<br>
<br>
Eli Friedman wrote:
<blockquote
 cite="mid:AANLkTimL3Yc-Egri33K1fPCptgio5jcvgI6Zr49CarQ0@mail.gmail.com"
 type="cite">
  <pre wrap="">On Fri, Jul 16, 2010 at 1:06 PM, David McNamara
<a class="moz-txt-link-rfc2396E" href="mailto:david.mcnamara@crescentbaysoftware.com"><david.mcnamara@crescentbaysoftware.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">All,

 I am just learning about clang/ llvm now and I have a very simple
question (and I must be missing something easy) but can someone answer
how I can use clang to create an ARM executable?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Cross-compilation with clang isn't really properly supported... "clang
-ccc-host-triple armv7-apple-darwin10 foo.c -c" (using an appropriate
triple for your platform) might do something close to what you want,
but expect to run into issues.

-Eli

  </pre>
</blockquote>
</body>
</html>