[LLVMdev] how to change a compiler from a host to a target in Clang's assembler and linker

ETANI NORIKO noriko-e at fc.ritsumei.ac.jp
Tue Jul 3 22:21:41 PDT 2012


Hi,

I would like to ask you how to use Clang in cross-compile environment. My environment is as follows:
------
HOST: 32-bit Fedora 16 with Intel Core i7
      gcc/g++ compiler available
TARGET: 32-bit mips-typed linux
      gnu gcc/g++ for 32-bit mips-typed linux available
------
       
As Clang's option is "-c" in use, my programs are compiled and linked under a host machine's environment (in my case, 32-bit Fedora 16 is a host OS with Intel Core i7). 

In order to compile and link them under a target's environment (in my case, mips-typed linux gcc/g++ can work), in Clang’s "Assembler" and "Linker" processes, a compiler on a host should be changed to one on a target. Still now, I cannot find out a file to set a compiler for "Assembler" and "Linker" in Clang. Please advise me how to change a compiler from a host one to a target one.

Regards,
------------
Noriko Etani





More information about the llvm-dev mailing list