Re: [PATCH/RFC] m68k: Add -ffreestanding to KBUILD_CFLAGS

From: Michal Marek
Date: Wed Apr 10 2013 - 11:22:37 EST


On Wed, Apr 10, 2013 at 04:19:14PM +0200, Geert Uytterhoeven wrote:
> Thanks for the patch, but modpost still fails with
>
> ERROR: "strlen" [net/ipv4/ip_tunnel.ko] undefined!

OK OK, I am convinced. Then how about this? If you prefer speed over
size, the the other option is to add

size_t strlen(const char *s)
{
return __kernel_strlen(s);
}
EXPORT_SYMBOL(strlen);

to arch/m68k/lib/string.c. On a related note, arch/m68k/lib/string.c is
built only in the CONFIG_MMU case, whereas asm/string.h is shared.

Michal