2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

tools: Work around BITS_PER_LONG related build failure in objtool

The objtool build fails with the recent changes to the bits-per-long
headers:

  tools/include/linux/bitops.h:12:0: error: "BITS_PER_LONG" redefined [-Werror]

Which got introduced by:

  bb9707077b tools: Copy the bitsperlong.h files from the kernel

Work it around for the time being.

Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2016-07-13 09:37:43 +02:00
parent 68cf16c6b8
commit 7b39cafb7a

View File

@ -9,7 +9,9 @@
#define __WORDSIZE (__SIZEOF_LONG__ * 8)
#endif
#ifndef BITS_PER_LONG
# define BITS_PER_LONG __WORDSIZE
#endif
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)