diff options
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index dd4b4c59c2f0..310f51d42550 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -224,6 +224,7 @@ | |||
224 | #endif /* GCC_VERSION >= 40500 */ | 224 | #endif /* GCC_VERSION >= 40500 */ |
225 | 225 | ||
226 | #if GCC_VERSION >= 40600 | 226 | #if GCC_VERSION >= 40600 |
227 | |||
227 | /* | 228 | /* |
228 | * When used with Link Time Optimization, gcc can optimize away C functions or | 229 | * When used with Link Time Optimization, gcc can optimize away C functions or |
229 | * variables which are referenced only from assembly code. __visible tells the | 230 | * variables which are referenced only from assembly code. __visible tells the |
@@ -231,7 +232,17 @@ | |||
231 | * this. | 232 | * this. |
232 | */ | 233 | */ |
233 | #define __visible __attribute__((externally_visible)) | 234 | #define __visible __attribute__((externally_visible)) |
234 | #endif | 235 | |
236 | /* | ||
237 | * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only | ||
238 | * possible since GCC 4.6. To provide as much build testing coverage | ||
239 | * as possible, this is used for all GCC 4.6+ builds, and not just on | ||
240 | * RANDSTRUCT_PLUGIN builds. | ||
241 | */ | ||
242 | #define randomized_struct_fields_start struct { | ||
243 | #define randomized_struct_fields_end } __randomize_layout; | ||
244 | |||
245 | #endif /* GCC_VERSION >= 40600 */ | ||
235 | 246 | ||
236 | 247 | ||
237 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) | 248 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) |