[LLVMdev] How to build llvm-config with a different compiler?

Frank Winter fwinter at jlab.org
Wed Mar 5 14:08:03 PST 2014


Found it! Looking through the Makefiles revealed that there's already an 
llvm-config-host tool installed that in case of a cross-build runs on 
the host.

Frank


On 05/03/14 15:55, Frank Winter wrote:
> In a cross build I'd need to retain the system compiler only for 
> llvm-config.
> E.g. I am doing
>
> $LLVMPATH/configure \
>     --prefix=$INSTALL/llvm-$TYPE \
>     --host=powerpc64-bgq-linux \
>     --build=powerpc64-unknown-linux-gnu \
>     --enable-shared \
>     CXX=${CXX} \
>     CC=${CC} \
>
> where CXX and CC are cross compilers. Doing this results in 
> llvm-config being built with CXX/CC which is not desired. When adding
>
>     BUILD_CC=gcc \
>     BUILD_CXX=g++
>
> still the llvm-config seems to be built with CXX/CC.
>
> Anyone any idea/hint?
>
> Thanks,
> Frank
>
> _______________________________________________
> 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