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

Frank Winter fwinter at jlab.org
Mon Dec 2 12:09:22 PST 2013


Hi,

I am trying to build LLVM 3.4 RC1 with the Intel compiler targeting the 
Xeon Phi (native). In order to skip the building and execution of a test 
binary during configuration one needs the set the "-host" option 
indicating a cross compilation. Intel suggests to use 
"x86_64-unknown-linux-gnu".

However, either using "x86_64-unknown-linux-gnu" or something unknown 
like "unknown" brings me through the configuration:

../llvm/configure CXX=icpc CC=icc CXXFLAGS="-O3 -mmic" CFLAGS="-O3 
-mmic" --host=x86_64-unknown-linux-gnu

configure: WARNING: If you wanted to set the --build type, don't use --host.
     If a cross compiler is detected then cross compile mode will be used.
checking for x86_64-unknown-linux-gnu-clang... icc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
...
checking for gcc... gcc
configure: error: installation or configuration problem: compiler cannot 
create executables.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.



../llvm/configure CXX=icpc CC=icc CXXFLAGS="-O3 -mmic" CFLAGS="-O3 
-mmic" --host=unknown
checking for unknown-clang... icc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...

configure: WARNING: Configuring LLVM for an unknown target archicture
configure: WARNING: Configuring LLVM for an unknown host archicture
checking for gcc... gcc
configure: error: installation or configuration problem: compiler cannot 
create executables.


Any ideas?

Frank





More information about the llvm-dev mailing list