]> git.karo-electronics.de Git - karo-tx-linux.git/commit
string: fix build error caused by memweight() introduction
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 21 Jul 2012 00:54:51 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 24 Jul 2012 05:00:50 +0000 (15:00 +1000)
commit8a9b8f739186368e0a4cccdc831d39ccfc938bd1
tree09ff97069e3244da69870eeb84b2e89725aaa453
parent5e6aa7abe7e85f72e576a9b71f8b2a49a32ff4bd
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>
lib/Makefile
lib/memweight.c [new file with mode: 0644]
lib/string.c