<div dir="ltr"><div><div><div><div><div><div>Hello Linux Team,<br><br>i am trying to cross compile a nexus5 kernel with clang but at the end i get the following errors while compiling.<br><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=&quot;/home/stefan/llvmlinux/toolchain/clang/head/install/bin/clang&quot; CC=&quot;/home/stefan/llvmlinux/toolchain/clang/head/install/bin/clang &quot;<br><br></div><br>drivers/built-in.o: In function `__video_do_ioctl&#39;:<br>/home/stefan/llvmlinux/targets/nexus5/src/android_kernel_nexus5/drivers/media/video/v4l2-ioctl.c:1604: undefined reference to `__aeabi_memclr4&#39;<br>make[1]: *** [.tmp_vmlinux1] Error 1<br>make: *** [sub-make] Error 2<br><br></div>Aeabi fails with my oneplus one and nexus5 kernel source. Here is the full error log <a rel="nofollow" target="_blank" href="http://pastebin.com/y3pSBzrN" class="" dir="ltr">http://pastebin.com/y3pSBzrN</a>.<br><br></div>I already tried different targets with no success. I already have this patch <a href="https://raw.githubusercontent.com/DerRomtester/one_plus_one/b01e0cd71219217821c35598f3945935081350cb/arch/arm/lib/eabi.c">https://raw.githubusercontent.com/DerRomtester/one_plus_one/b01e0cd71219217821c35598f3945935081350cb/arch/arm/lib/eabi.c</a> <br></div>but it seems like some of these functions are missing ? This does not happen with gcc 4.9. So where are these aeabi defined? Newlib ?  Do we need a patch for that ? How can i solve that? <br><br></div>Maybe you can help me to get the first android kernel compiled with clang,<br><br></div>Kind regards,<br></div>Stefan <br><div><div><div><br><br><br></div></div></div></div>