[LLVMdev] Configuring for cross-compilation doesn't work

Richard Pennington rich at pennware.com
Mon Dec 2 14:45:29 PST 2013


On 12/02/2013 02:18 PM, Frank Winter wrote:
> Let me add that when not specifying the '--host' option, the whole 
> thing fails as well:
>
> ../llvm/configure CXX=icpc CC=icc CXXFLAGS="-O3 -mmic" CFLAGS="-O3 -mmic"
>
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run 
> C compiled programs.
> If you meant to cross compile, use `--host'.
>
> Frank
You also need the --build option. --host should be the target system and 
--build should be set to the build host. Then configure will use the 
build host's compiler to build stuff that needs to run there, like tblgen.

I use this to cross build my clang/LLVM based tool chain, ELLCC. 
http://ellcc.org

-Rich



More information about the llvm-dev mailing list