Something wrong with Clang for ARM-Cortex-A8.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Something wrong with Clang for ARM-Cortex-A8.

Jia Liu
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

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Something wrong with Clang for ARM-Cortex-A8.

Renato Golin
On 6 May 2010 03:50, 爱好者 <[hidden email]> wrote:
> 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... ;)
Maybe someone else knows a better way of doing this...

cheers,
--renato

http://systemcall.org/

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Something wrong with Clang for ARM-Cortex-A8.

Jia Liu
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.
Liu

2010/5/6 Renato Golin <[hidden email]>
On 6 May 2010 03:50, 爱好者 <[hidden email]> wrote:
> 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... ;)
Maybe someone else knows a better way of doing this...

cheers,
--renato

http://systemcall.org/

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev