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

Jan-Simon Möller dl9pf at gmx.de
Tue Aug 25 08:31:43 UTC 2015


See the archives (end of thread "Ugly test fix for eabi-arm.patch") , we just 
in the last 2 weeks discussed the case that LLVM/clang is wrongly adding the 
references for these and not
obeys the -nostdic / -freestanding  flags passed by the kernel's makefiles.

-- 

Dipl.-Ing.
Jan-Simon Möller

jansimon.moeller at gmx.de
On Monday 24 August 2015 23:58:35 Khem Raj wrote:
> > On Aug 24, 2015, at 6:14 AM, Fürst Stefan <dieb.stefan.96 at gmail.com>
> > wrote:
> > 
> > drivers/built-in.o: In function `__video_do_ioctl':
> > /home/stefan/llvmlinux/targets/nexus5/src/android_kernel_nexus5/drivers/me
> > dia/video/v4l2-ioctl.c:1604: undefined reference to `__aeabi_memclr4'
> > make[1]: *** [.tmp_vmlinux1] Error 1
> > make: *** [sub-make] Error 2
> 
> This means that compiler is finding a place where it can rely on builtins
> function implemented in compiler runtime which is compiler-rt or libgcc
> depending upon which runtime you use. if it was a user application, then 
> simply linking with compiler-rt would have been sufficient but in kernel it
> does not require any C runtime and whatever is needed is implemented in
> kernel itself. So kernel has a small helper library which implements some
> of these builtins, you have two options,
> 
> 1. Implement this builtin in kernel
> 2. Alter the code in question so that compiler does not generate the call to
> builtin 3. Add -fno-builtin-<value> to compiler flags to disable compiler
> from emitting it
> 
> Thanks
> -Khem



More information about the LLVMLinux mailing list