[llvm-dev] build issue in llvm-clang cross tool chain for arm target

Balasaheb Dabhade via llvm-dev llvm-dev at lists.llvm.org
Sun May 8 08:18:38 PDT 2016


Thanks a lot  Renoto,

I really appreciate your help.

As you mentioned I have modified the command to include gcc libs path(-L )
option in cmake command as below :

cmake -G Ninja /home/iiita/crossbuild/llvm -DLLVM_ENABLE_PIC=False
-DLLVM_ENABLE_LIBCXX=ON -DCMAKE_CROSSCOMPILING=True
-DCMAKE_INSTALL_PREFIX=/home/iiita/crossbuild/build
-DLLVM_TABLEGEN=/home/iiita/llvm-3.8/build/bin/llvm-tblgen
-DCLANG_TABLEGEN=/home/iiita/llvm-3.8/build/bin/clang-tblgen
-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_TARGET_ARCH=ARM
-DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-target
*arm-linux-gnueabihf-gcc* -mcpu=cortex-a9
-I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/
-I/usr/arm-linux-gnueabihf/include/ *-L/usr/lib/gcc/arm-linux-gnueabihf*
-mfloat-abi=hard -ccc-gcc-name arm-linux-gnueabihf-gcc'

However, I am still facing the issue since *cmake not able to find header
file path as per **CMakeError.log (attached for email for reference) error
message*.

Do you have any idea about how to include header file path in cmake command
line or is there any other thing I am missing?


Thanks,
Bala



On Sun, May 8, 2016 at 7:52 PM, Renato Golin <renato.golin at linaro.org>
wrote:

> On 6 May 2016 at 18:28, Balasaheb Dabhade via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-target
> > armv7a-linux-gnueabihf -mcpu=cortex-a9
> > -I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/
> > -I/usr/arm-linux-gnueabihf/include/ -mfloat-abi=hard -ccc-gcc-name
> > arm-linux-gnueabihf-gcc'
>
> I can think of two things:
>
> 1. You're using a triple that is different from your gcc name:
>
> '-target armv7a-linux-gnueabihf'
>
> vs
>
> '-ccc-gcc-name arm-linux-gnueabihf-gcc'
>
> You should use the target as "arm-linux-gnueabihf".
>
> 2. You're not including the GCC headers or libraries.
>
> You need to find where GCC keeps its libraries (normally
> /usr/lib/gcc/arm-linux-gnueabihf) and headers (if necessary).
>
> In your case, just adding -L"where your gcc libs are" should be enough.
>
> cheers,
> --renato
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160508/41b1af16/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeError.log
Type: text/x-log
Size: 14895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160508/41b1af16/attachment.bin>


More information about the llvm-dev mailing list