]> 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>
Wed, 25 Jul 2012 03:53:17 +0000 (13:53 +1000)
commitf833df7534fac468b1094ddd75b0f8693d8ca817
tree66b05bb3bdd400d1a06928bccd5fe7e86a3b4dfb
parent1462d3a987cfed022434010877ba95fc9f5d1ebe
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