[llvm-dev] Requesting for help.

sumedh jambekar via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 23 06:27:33 PDT 2018


 Thanks Bruce, what about the *target* and
*DLLVM_DEFAULT_TARGET_TRIPLE *options?
Should it be *aarch64-linux-gnu*?

Thanks,
Sumedh


On Mon, Jul 23, 2018 at 3:20 PM, Bruce Hoult <brucehoult at sifive.com> wrote:

> You say you want to compile for 64 bit ARM (and most of your settings show
> that) but you have "-DLLVM_TARGETS_TO_BUILD=ARM".
>
> 32 bit ARM and 64 bit ARM are different and unrelated architectures.
>
> Try
>
> -DLLVM_TARGETS_TO_BUILD=AArch64
>
>
> On Mon, Jul 23, 2018 at 5:04 AM, sumedh jambekar via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> Hello All,
>>
>> I need some help with respect to cross compiling for ARM.
>>
>> While trying to cross compile for the ARM target, I am hitting some
>> errors. I need some help in this.
>>
>> I use the following command to cross compile for ARM Cortex A72 (ARM
>> v8-a), 64 bit architecture:
>>
>> *cmake -v CC='clang' CXX='clang++'
>> -DCMAKE_C_COMPILER=../build_directory_llvm/bin/clang
>> -DCMAKE_CXX_COMPILER=../build_directory_llvm/bin/clang++
>> -DLLVM_TABLEGEN=../build_llvm_directory/bin/llvm-tblgen
>> -DCLANG_TABLEGEN=../build_llvm_directory/bin/clang-tblgen
>> -DCROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=../tmp_two
>> -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-gnu -DLLVM_TARGET_ARCH=AARCH64
>> -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-target aarch64-linux-gnu
>> --sysroot=../myOwnToolChainTwo/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc
>> --gcc-toolchain=../myOwnToolChainTwo/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/
>> -mcpu=cortex-a72' -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_PIC=False ../llvm/*
>>
>>
>> I hit the error stating that "*error: unable to create target: 'No
>> available targets are compatible with this triple.*'"
>>
>> I am using ARMv8-a as my target which is 64 bit. Can you please let me
>> know whether the target triple I am using is correct? Can you also please
>> let me know whether I am using the right -mcpu option?
>>
>> Thanks,
>> Sumedh
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180723/0907df75/attachment.html>


More information about the llvm-dev mailing list