Skip to content

Commit 7b39caf

Browse files
committed
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: 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>
1 parent 68cf16c commit 7b39caf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tools/include/linux/bitops.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#define __WORDSIZE (__SIZEOF_LONG__ * 8)
1010
#endif
1111

12-
#define BITS_PER_LONG __WORDSIZE
12+
#ifndef BITS_PER_LONG
13+
# define BITS_PER_LONG __WORDSIZE
14+
#endif
1315

1416
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
1517
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)

0 commit comments

Comments
 (0)