<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 9:50 AM, Fürst Stefan <span dir="ltr"><<a href="mailto:dieb.stefan.96@gmail.com" target="_blank">dieb.stefan.96@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>i am trying to cross compile a nexus5 kernel with clang but at the end i get one error.<br></div><div>The steps i did were<br><div>git clone <a href="http://git.linuxfoundation.org/llvmlinux.git" target="_blank">http://git.linuxfoundation.org/llvmlinux.git</a></div><div>cd llvmlinux</div><div>cd targets/vexpress</div><div>make kernel-shell-for-build<br></div><div>cd ../../<br></div><div>cd targets<br></div><div>cd nexus5<br></div><div>make<br></div><br></div><div>Than i applied all necessary patches.<br></div><div>The build command looks like this<br>make ARCH=arm CROSS_COMPILE=/home/stefan/llvmlinux/arch/arm/toolchain/linaro/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf- -l4 -j5 GCC_TOOLCHAIN=/home/stefan/llvmlinux/arch/arm/toolchain/linaro/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux KBUILD_OUTPUT=/home/stefan/llvmlinux/targets/nexus5/build/kernel-clang HOSTCC="/home/stefan/llvmlinux/toolchain/clang/head/install/bin/clang" CC="/home/stefan/llvmlinux/toolchain/clang/head/install/bin/clang "<br><br></div><div><br>drivers/built-in.o: In function `__video_do_ioctl':<br>/home/stefan/llvmlinux/targets/nexus5/src/android_kernel_nexus5/drivers/media/video/v4l2-ioctl.c:1604: undefined reference to `__aeabi_memclr4'<br>make[1]: *** [.tmp_vmlinux1] Error 1<br>make: *** [sub-make] Error 2<br></div><br></div>So does clang already support aeabi. Why does it fail?<br></div></div></div></blockquote><div><br></div><div>The issue isn't clang. It properly generated code for a hosted AEABI compliant environment. In fact, the error is indicating the problem: you don't have an implementation for __aeabi_memclr4. Where does the implementation come from? Since you are building a kernel, you are in a freestanding environment, and the functionality that is normally provided by the C runtime (libc) is not present. You need to provide an implementation yourself.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div></div>Kind regards<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Stefan<br><div><div><div><div> <br></div></div></div></div></font></span></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div>