[llvm-dev] bug: cross-compile Clang/LLVM for ARM using Clang/LLVM

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 25 10:03:36 PDT 2016


On 25 April 2016 at 16:56, 李阳 <yanglee.cqu at gmail.com> wrote:
> -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'

Try to change the triple to "arm-linux-gnueabihf" as I mentioned
earlier. Clang is getting confused.


> /usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi

This is certainly not the ARM linker. :)


> 2. If I maually add all the libraries/headers, it don't produce the errors
> above.

If you're using --sysroot, the only library path you may have to use
is /usr/lib/gcc/arm-linux-gnueabihf/VERSION/ due to GCC run-time
libraries.

cheers,
--renato


More information about the llvm-dev mailing list