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

Frank Winter fwinter at jlab.org
Mon Dec 2 14:00:12 PST 2013


For the record: CMake is needed for cross compilation.

There is a small article how to cross compile with CMake for Xeon Phi:

http://software.intel.com/en-us/articles/cross-compilation-for-intel-xeon-phi-coprocessor-with-cmake

Frank


On 02/12/13 15:18, 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
>
>
> On 02/12/13 15:09, Frank Winter wrote:
>> 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
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list