diff options
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/linux/compiler-gcc.h | 4 | ||||
-rw-r--r-- | tools/include/linux/compiler.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/include/linux/compiler-gcc.h b/tools/include/linux/compiler-gcc.h index 48af2f10a42d..616935f1ff56 100644 --- a/tools/include/linux/compiler-gcc.h +++ b/tools/include/linux/compiler-gcc.h | |||
@@ -12,3 +12,7 @@ | |||
12 | #if GCC_VERSION >= 70000 && !defined(__CHECKER__) | 12 | #if GCC_VERSION >= 70000 && !defined(__CHECKER__) |
13 | # define __fallthrough __attribute__ ((fallthrough)) | 13 | # define __fallthrough __attribute__ ((fallthrough)) |
14 | #endif | 14 | #endif |
15 | |||
16 | #if GCC_VERSION >= 40300 | ||
17 | # define __compiletime_error(message) __attribute__((error(message))) | ||
18 | #endif /* GCC_VERSION >= 40300 */ | ||
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 @@ | |||
5 | #include <linux/compiler-gcc.h> | 5 | #include <linux/compiler-gcc.h> |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #ifndef __compiletime_error | ||
9 | # define __compiletime_error(message) | ||
10 | #endif | ||
11 | |||
8 | /* Optimization barrier */ | 12 | /* Optimization barrier */ |
9 | /* The "volatile" is due to gcc bugs */ | 13 | /* The "volatile" is due to gcc bugs */ |
10 | #define barrier() __asm__ __volatile__("": : :"memory") | 14 | #define barrier() __asm__ __volatile__("": : :"memory") |