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