Skip to content

Commit

Permalink
tools: Work around BITS_PER_LONG related build failure in objtool
Browse files Browse the repository at this point in the history
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:

  bb97070 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>
  • Loading branch information
Ingo Molnar committed Jul 13, 2016
1 parent 68cf16c commit 7b39caf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/include/linux/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#define __WORDSIZE (__SIZEOF_LONG__ * 8)
#endif

#define BITS_PER_LONG __WORDSIZE
#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)
Expand Down

0 comments on commit 7b39caf

Please sign in to comment.