string: fix build error caused by memweight() introduction
Tony Luck reports a build error on the ia64 sim_defconfig:
LD arch/ia64/hp/sim/boot/bootloader
lib/lib.a(string.o): In function `bitmap_weight':
.../linux-next/include/linux/bitmap.h:280: undefined reference to `__bitmap_weight'
It fails because it pulls in lib/lib.a(string.o) to get some
innocuous function like strcpy() ... but it also gets
given memweight() which relies on __bitmap_weight()
which it doesn't have, because it doesn't include lib/built-in.o
(which is where bitmap.o, the definer of __bitmap_weight(), has
been linked).
This build error is introduced by the patch string-introduce-memweight.patch
in -mm tree. Fix it by creating own file lib/memweight.c.
Reported-by: Tony Luck <tony.luck@gmail.com> Suggested-by: Tony Luck <tony.luck@gmail.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>