[cfe-dev] Problem running clang on ARM

Benjamin Kramer benny.kra at googlemail.com
Wed Nov 4 08:55:09 PST 2009


Am 04.11.2009 um 11:34 schrieb Prasanth J:

> Hi all,
>
> I am in the process of developing a installer utility for ARM target  
> which
> can compile any source files to ARM native executable. This installer
> utility should be present on target itself (whether this is feasible  
> or
> not?). For achieving this i compiled llvm with clang for target. I  
> copied
> the binaries to target and when it tried to compile a sample c code  
> i am
> getting the following error.
>
>
> *# ../bin/clang hello.c
> clang: warning: not using the clang compiler for the 'arm'  
> architecture

This warning means that clang is using gcc to compile your source file.
You probably don't want that. I don't know how well clang works on arm  
but
you can use "-ccc-clang-archs arm" (see clang --help-hidden) to disable
this behavior.

> clang: error: unable to make temporary file: /tmp/cc: can't make  
> unique
> filename: No such file or directory
> clang: error: unable to make temporary file: /tmp/cc: can't make  
> unique
> filename: No such file or directory
> # *
>
> my target device doesnot hav /tmp and it doesnot have write  
> permission for
> creating any directory on root "/". is there anyway to tell clang to  
> create
> temporary files in some other location other than "/tmp" ? can  
> anyone help
> me in resolving this issue? pls let me know in case if any more  
> information
> is required.

Setting the TMPDIR environment variable may be helpful.

e.g.
TMPDIR=/foo/bar/tmp clang hello.c

>
> pls let me know how can i resolve this issues. the target details are
> target arch : arm
> target cpu : arm1136jf-s
>
>
> Thanks and Regards,
> Prasanth J
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list