diff options
-rw-r--r-- | include/linux/compiler-gcc3.h | 8 | ||||
-rw-r--r-- | include/linux/compiler-gcc4.h | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 37d412436d0f..7d89febe4d79 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -2,22 +2,22 @@ | |||
2 | #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." | 2 | #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #if __GNUC_MINOR__ < 2 | 5 | #if GCC_VERSION < 30200 |
6 | # error Sorry, your compiler is too old - please upgrade it. | 6 | # error Sorry, your compiler is too old - please upgrade it. |
7 | #endif | 7 | #endif |
8 | 8 | ||
9 | #if __GNUC_MINOR__ >= 3 | 9 | #if GCC_VERSION >= 30300 |
10 | # define __used __attribute__((__used__)) | 10 | # define __used __attribute__((__used__)) |
11 | #else | 11 | #else |
12 | # define __used __attribute__((__unused__)) | 12 | # define __used __attribute__((__unused__)) |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #if __GNUC_MINOR__ >= 4 | 15 | #if GCC_VERSION >= 30400 |
16 | #define __must_check __attribute__((warn_unused_result)) | 16 | #define __must_check __attribute__((warn_unused_result)) |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef CONFIG_GCOV_KERNEL | 19 | #ifdef CONFIG_GCOV_KERNEL |
20 | # if __GNUC_MINOR__ < 4 | 20 | # if GCC_VERSION < 30400 |
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" |
22 | # endif /* __GNUC_MINOR__ */ | 22 | # endif /* __GNUC_MINOR__ */ |
23 | #endif /* CONFIG_GCOV_KERNEL */ | 23 | #endif /* CONFIG_GCOV_KERNEL */ |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index c9785c22744e..a9ffdfe7713c 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | /* GCC 4.1.[01] miscompiles __weak */ | 5 | /* GCC 4.1.[01] miscompiles __weak */ |
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | # if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1 | 7 | # if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 |
8 | # error Your version of gcc miscompiles the __weak directive | 8 | # error Your version of gcc miscompiles the __weak directive |
9 | # endif | 9 | # endif |
10 | #endif | 10 | #endif |
@@ -13,11 +13,11 @@ | |||
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | 15 | ||
16 | #if __GNUC_MINOR__ > 0 | 16 | #if GCC_VERSION >= 40100 |
17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #if __GNUC_MINOR__ >= 3 | 20 | #if GCC_VERSION >= 40300 |
21 | /* Mark functions as cold. gcc will assume any path leading to a call | 21 | /* Mark functions as cold. gcc will assume any path leading to a call |
22 | to them will be unlikely. This means a lot of manual unlikely()s | 22 | to them will be unlikely. This means a lot of manual unlikely()s |
23 | are unnecessary now for any paths leading to the usual suspects | 23 | are unnecessary now for any paths leading to the usual suspects |
@@ -41,9 +41,9 @@ | |||
41 | # define __compiletime_warning(message) __attribute__((warning(message))) | 41 | # define __compiletime_warning(message) __attribute__((warning(message))) |
42 | # define __compiletime_error(message) __attribute__((error(message))) | 42 | # define __compiletime_error(message) __attribute__((error(message))) |
43 | #endif /* __CHECKER__ */ | 43 | #endif /* __CHECKER__ */ |
44 | #endif /* __GNUC_MINOR__ >= 3 */ | 44 | #endif /* GCC_VERSION >= 40300 */ |
45 | 45 | ||
46 | #if __GNUC_MINOR__ >= 5 | 46 | #if GCC_VERSION >= 40500 |
47 | /* | 47 | /* |
48 | * Mark a position in code as unreachable. This can be used to | 48 | * Mark a position in code as unreachable. This can be used to |
49 | * suppress control flow warnings after asm blocks that transfer | 49 | * suppress control flow warnings after asm blocks that transfer |
@@ -58,9 +58,9 @@ | |||
58 | /* Mark a function definition as prohibited from being cloned. */ | 58 | /* Mark a function definition as prohibited from being cloned. */ |
59 | #define __noclone __attribute__((__noclone__)) | 59 | #define __noclone __attribute__((__noclone__)) |
60 | 60 | ||
61 | #endif /* __GNUC_MINOR__ >= 5 */ | 61 | #endif /* GCC_VERSION >= 40500 */ |
62 | 62 | ||
63 | #if __GNUC_MINOR__ >= 6 | 63 | #if GCC_VERSION >= 40600 |
64 | /* | 64 | /* |
65 | * Tell the optimizer that something else uses this function or variable. | 65 | * Tell the optimizer that something else uses this function or variable. |
66 | */ | 66 | */ |
@@ -69,11 +69,11 @@ | |||
69 | 69 | ||
70 | 70 | ||
71 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | 71 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP |
72 | #if __GNUC_MINOR__ >= 4 | 72 | #if GCC_VERSION >= 40400 |
73 | #define __HAVE_BUILTIN_BSWAP32__ | 73 | #define __HAVE_BUILTIN_BSWAP32__ |
74 | #define __HAVE_BUILTIN_BSWAP64__ | 74 | #define __HAVE_BUILTIN_BSWAP64__ |
75 | #endif | 75 | #endif |
76 | #if __GNUC_MINOR__ >= 8 || (defined(__powerpc__) && __GNUC_MINOR__ >= 6) | 76 | #if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) |
77 | #define __HAVE_BUILTIN_BSWAP16__ | 77 | #define __HAVE_BUILTIN_BSWAP16__ |
78 | #endif | 78 | #endif |
79 | #endif | 79 | #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ |