李阳 via llvm-dev
2016-Apr-25 15:40 UTC
[llvm-dev] bug: cross-compile Clang/LLVM for ARM using Clang/LLVM
Hi James, renato, So how do I download the missing ARM libraries on Ubuntu14.04? I cannot find any available libraries. Best, Liyang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160425/04dfc553/attachment.html>
James Molloy via llvm-dev
2016-Apr-25 15:42 UTC
[llvm-dev] bug: cross-compile Clang/LLVM for ARM using Clang/LLVM
You shouldn't need any. Did you attempt my suggestion ? On Mon, 25 Apr 2016 at 16:40, 李阳 <yanglee.cqu at gmail.com> wrote:> Hi James, renato, > > So how do I download the missing ARM libraries on Ubuntu14.04? I cannot > find any available libraries. > > Best, > Liyang >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160425/f3dd99d3/attachment.html>
李阳 via llvm-dev
2016-Apr-25 15:56 UTC
[llvm-dev] bug: cross-compile Clang/LLVM for ARM using Clang/LLVM
Hi James, 1. I have tried with your suggestion, the command is as follows: CC='clang' CXX='clang++' cmake -G Ninja ../llvm-source-code -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=./llvm -DLLVM_TABLEGEN=/home/lab/workspace/llvm/build4x86/bin/llvm-tblgen -DCLANG_TABLEGEN=/home/lab/workspace/llvm/build4x86/bin/clang-tblgen -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-target armv7a-linux-gnueabihf -mcpu=cortex-a9 --sysroot=/usr/arm-linux-gnueabihf/ -mfloat-abi=hard -ccc-gcc-name arm-linux-gnueabihf-gcc' -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_PIC=False But it still produce error, like this: CMake Error at /home/lab/workspace/cmake-3.2.0-Linux-x86_64/share/cmake-3.2/Modules/CMakeTestCXXCompiler.cmake:54 (message): The C++ compiler "/home/lab/workspace/llvm/build4x86/bin/clang++" is not able to compile a simple test program. /usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om i386pep i386pe clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. 2. If I maually add all the libraries/headers, it don't produce the errors above. So I think I still need to download some necessary libraries. Thanks for your reply! Best, Liyang 2016-04-25 23:42 GMT+08:00 James Molloy <james at jamesmolloy.co.uk>:> You shouldn't need any. Did you attempt my suggestion ? > > On Mon, 25 Apr 2016 at 16:40, 李阳 <yanglee.cqu at gmail.com> wrote: > >> Hi James, renato, >> >> So how do I download the missing ARM libraries on Ubuntu14.04? I cannot >> find any available libraries. >> >> Best, >> Liyang >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160425/05f4582a/attachment.html>