<div dir="ltr">Hello All,<div><br></div><div>I need some help with respect to cross compiling for ARM.</div><div><br></div><div>While trying to cross compile for the ARM target, I am hitting some errors. I need some help in this.</div><div><br></div><div>I use the following command to cross compile for ARM Cortex A72 (ARM v8-a), 64 bit architecture:</div><div><br></div><div>

<b style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">cmake -v CC='clang' CXX='clang++' -DCMAKE_C_COMPILER=../build_<wbr>directory_llvm/bin/clang -DCMAKE_CXX_COMPILER=../build_<wbr>directory_llvm/bin/clang++ -DLLVM_TABLEGEN=../build_llvm_<wbr>directory/bin/llvm-tblgen -DCLANG_TABLEGEN=../build_<wbr>llvm_directory/bin/clang-<wbr>tblgen -DCROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=../tmp_<wbr>two -DLLVM_DEFAULT_TARGET_TRIPLE=<wbr>aarch64-linux-gnu -DLLVM_TARGET_ARCH=AARCH64 -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-target aarch64-linux-gnu --sysroot=../<wbr>myOwnToolChainTwo/gcc-linaro-<wbr>7.3.1-2018.05-x86_64_aarch64-<wbr>linux-gnu/aarch64-linux-gnu/<wbr>libc --gcc-toolchain=../<wbr>myOwnToolChainTwo/gcc-linaro-<wbr>7.3.1-2018.05-x86_64_aarch64-<wbr>linux-gnu/ -mcpu=cortex-a72' -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_PIC=False ../llvm/</b>

<br></div><div><br></div><div><br></div><div>

<div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">I hit the error stating that "<b>error: unable to create target: 'No available targets are compatible with this triple.</b>'"</div><div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">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?</div>

<br></div><div>Thanks,</div><div>Sumedh</div></div>