Something wrong with Clang for ARM-Cortex-A8.

hi all
My host is Linux on x86. I configure LLVM with Clang using “–enable-targets=arm”, build it, install.

I use it as “clang -ccc-host-triple armv7-unknown-linux-gnueabi /root/tes.c”. Clang can’t find as and ld.

When I use it as “clang -ccc-host-triple armv7-unknown-linux-gnueabi -S /root/test.c”

clang: warning: unknown platform, assuming -mfloat-abi=soft

How can I use Clang to compile for the target ARM-Cortex-A8 on my host.

thank you all

Hi there,

Try to generate IR (-emit-llvm) and then compile with llc:

$ clang -ccc-host-triple armv7-unknown-linux-gnueabi -emit-llvm
/root/tes.c (-I gcc arm includes -L gcc arm libs) -o tes.bc
$ llc tes.bc -o tes.s (some more options)

And continue with codesourcery gcc from then on.

Or maybe you can find your way around all the options that will make
clang drive the compilation process through the correct path... :wink:
Maybe someone else knows a better way of doing this...


Reclaim your digital rights, eliminate DRM, learn more at

Hi Renato
Thank you very much. I’ll try llvm in another part of our system. If I get time, I’ll patch clang/llvm. Thank you, whatever.

2010/5/6 Renato Golin <>