aboutsummaryrefslogtreecommitdiff
path: root/tools/include/linux/compiler.h
diff options
context:
space:
mode:
authorGravatar Arnaldo Carvalho de Melo <acme@redhat.com> 2017-02-22 16:48:24 -0300
committerGravatar Arnaldo Carvalho de Melo <acme@redhat.com> 2017-03-03 19:07:13 -0300
commit4900653829175f60356efc279695bb23c59483c3 (patch)
tree7c7b3abf61ac8f4064c74d9d930d9197a7ff4dcd /tools/include/linux/compiler.h
parentperf stat: Issue a HW watchdog disable hint (diff)
downloadlinux-4900653829175f60356efc279695bb23c59483c3.tar.gz
linux-4900653829175f60356efc279695bb23c59483c3.tar.bz2
linux-4900653829175f60356efc279695bb23c59483c3.zip
tools include: Adopt __compiletime_error
From the kernel, get the gcc one and provide the fallback so that we can continue build with other compilers, such as with clang. Will be used by tools/arch/x86/include/asm/cmpxchg.h. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Elena Reshetova <elena.reshetova@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-pecgz6efai4a9euuk4rxuotr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include/linux/compiler.h')
-rw-r--r--tools/include/linux/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index 8de163b17c0d..c9e65e8faacd 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -5,6 +5,10 @@
#include <linux/compiler-gcc.h>
#endif
+#ifndef __compiletime_error
+# define __compiletime_error(message)
+#endif
+
/* Optimization barrier */
/* The "volatile" is due to gcc bugs */
#define barrier() __asm__ __volatile__("": : :"memory")