<div dir="ltr">I added the eabi.c file to satisfy missing __aeabi_* functions that the compiler is required to generate for ARM but that the clang toolchain is not providing from the C library. I do not know if gcc uses libgcc to satisfy these functions or if it is some other part of gcc. I believe Android added the __aeabi_* functions to bionic, but the kernel does not link with a libc.a so I am not sure I know where the functions should be provided.<div><br></div><div>It looks like TCC uses an external library to provide these functions: <a href="http://sourceforge.net/projects/paeabi/">http://sourceforge.net/projects/paeabi/</a><br><div><br></div><div>-Mark</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 24, 2015 at 6:14 AM, Fürst Stefan <span dir="ltr">&lt;<a href="mailto:dieb.stefan.96@gmail.com" target="_blank">dieb.stefan.96@gmail.com</a>&gt;</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><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" href="http://pastebin.com/y3pSBzrN" dir="ltr" target="_blank">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" target="_blank">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>
<br>_______________________________________________<br>
LLVMLinux mailing list<br>
<a href="mailto:LLVMLinux@lists.linuxfoundation.org">LLVMLinux@lists.linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux</a><br></blockquote></div><br></div>