[tip:perf/core] tools: Work around BITS_PER_LONG related build failure in objtool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  7b39cafb7aa68ef8e32a9f51fbe737d96084ca74
Gitweb:     http://git.kernel.org/tip/7b39cafb7aa68ef8e32a9f51fbe737d96084ca74
Author:     Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Wed, 13 Jul 2016 09:37:43 +0200
Committer:  Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Wed, 13 Jul 2016 09:37:43 +0200

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:

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

Work it around for the time being.

Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
 tools/include/linux/bitops.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h
index 5ad9ee1..49c929a 100644
--- a/tools/include/linux/bitops.h
+++ b/tools/include/linux/bitops.h
@@ -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)
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux