[llvm-dev] bug: cross-compile Clang/LLVM for ARM using Clang/LLVM
李阳 via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 25 04:26:21 PDT 2016
1. The command above is followed by the guide[ HowToCrossCompileLLVM.rst ]
and I specify some path(ex. <path-to-host-bin>).
2. The including x86_64 libraries is added because of some missing
libraries(ex. "error: Host compiler appears to require libatomic, but
cannot find it"). As I have found that the bugs needed to dealt with is
some ARM-dependent libraries, I cannot download them on Ubuntu14, could you
share them or some available links?
Thanks very much!
2016-04-25 18:33 GMT+08:00 Renato Golin <renato.golin at linaro.org>:
> On 25 April 2016 at 10:39, 李阳 via llvm-dev <llvm-dev at lists.llvm.org>
>> CC='clang' CXX='clang++' cmake -G Ninja ../llvm-source-code
>> -DCMAKE_CXX_FLAGS='-target armv7a-linux-gnueabihf -mcpu=cortex-a9
>> -L/usr/lib/gcc/x86_64-linux-gnu/4.8/libatomic.a -mfloat-abi=hard
>> -ccc-gcc-name arm-linux-gnueabihf-gcc'
> Hi Liyang,
> You have "LLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf" and
> "CMAKE_CXX_FLAGS='-target armv7a-linux-gnueabihf" which are different, and
> may confuse Clang when finding tools and libraries. Use whatever is the ARM
> triple in your system (looks like it's "arm-linux-gnueabihf") and make both
> target triple and "-target" to be that exact same string.
> Also, you're including x86_64 libraries
> (ex. -L/usr/lib/gcc/x86_64-linux-gnu/4.8/libatomic.so) to an ARM
> compilation job, that won't work. You have to find the ARM version (maybe
> /usr/lib/gcc/arm-linux-gnueabihf/ ?).
> Finally, the include paths with -I are only necessary if Clang cannot find
> it. The first three should be ok, but using -I on a DSO object
> (libatomic.so) makes no sense.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev