[llvmlinux] Compilation errors android msm-caf-nexus5 and oneplus one

Mark Charlebois charlebm at gmail.com
Tue Aug 25 06:23:39 UTC 2015


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.

It looks like TCC uses an external library to provide these functions:
http://sourceforge.net/projects/paeabi/

-Mark

On Mon, Aug 24, 2015 at 6:14 AM, Fürst Stefan <dieb.stefan.96 at gmail.com>
wrote:

> Hello Linux Team,
>
> i am trying to cross compile a nexus5 kernel with clang but at the end i
> get the following errors while compiling.
> The steps i did were
> git clone http://git.linuxfoundation.org/llvmlinux.git
> cd llvmlinux
> cd targets/vexpress
> make kernel-shell-for-build
> cd ../../
> cd targets
> cd nexus5
> make
>
> Than i applied all necessary patches.
> The build command looks like this
> 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 "
>
>
> drivers/built-in.o: In function `__video_do_ioctl':
> /home/stefan/llvmlinux/targets/nexus5/src/android_kernel_nexus5/drivers/media/video/v4l2-ioctl.c:1604:
> undefined reference to `__aeabi_memclr4'
> make[1]: *** [.tmp_vmlinux1] Error 1
> make: *** [sub-make] Error 2
>
> Aeabi fails with my oneplus one and nexus5 kernel source. Here is the full
> error log http://pastebin.com/y3pSBzrN.
>
> I already tried different targets with no success. I already have this
> patch
> https://raw.githubusercontent.com/DerRomtester/one_plus_one/b01e0cd71219217821c35598f3945935081350cb/arch/arm/lib/eabi.c
> 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?
>
> Maybe you can help me to get the first android kernel compiled with clang,
>
> Kind regards,
> Stefan
>
>
>
>
> _______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20150824/9b0a8b52/attachment.html>


More information about the LLVMLinux mailing list