I got following error while compiling a kernel module with glibc toolchain (codesoucery arm-2009q1), gcc-4.3.3
XXX.h:20: sorry, unimplemented: inlining failed in call to 'YYY': function body not available
ZZZ.c:83: sorry, unimplemented: called from here
While using the uclibc toolchain built from buildroot, gcc-4.3.3 doesn't.
[PATCH] fix inlining related build failures in mxser.c
One simple way to fix those is to simply un-inline the functions in question (and since they are somewhat large that's what I did) - an alternative would be to rework the ordering of the file so the functions are defined before their first use.http://lkml.org/lkml/2004/12/24/18
Add -funit-at-a-time to the CFLAGS, and the compiler is happy.http://lkml.org/lkml/2005/1/3/147
unit-at-a-time is already enabled at -O2 in 3.4 .
The kernel Makefile explicitely disables it on i386.
Bug 147446 - inlined function description results in "sorry, unimplemented" message
This is not a GCC bug, but combination of vpnclient bug and kernel "feature".
Kernel insists to define inline to inline __attribute__((always_inline)) for certain GCC versions. This attribute is a requirement that the function in question must be inlined or the compilation fails if that is not possible. The problem on vpnclient side is that it declares a function prototype as inline, without defining its body.
Simply remove the inline keyword from it and it will work.
Linux From Scratch