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 c28cedde973f..71b86a5d3061 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -237,6 +237,7 @@ | |||
237 | #endif /* GCC_VERSION >= 40500 */ | 237 | #endif /* GCC_VERSION >= 40500 */ |
238 | 238 | ||
239 | #if GCC_VERSION >= 40600 | 239 | #if GCC_VERSION >= 40600 |
240 | |||
240 | /* | 241 | /* |
241 | * When used with Link Time Optimization, gcc can optimize away C functions or | 242 | * When used with Link Time Optimization, gcc can optimize away C functions or |
242 | * variables which are referenced only from assembly code. __visible tells the | 243 | * variables which are referenced only from assembly code. __visible tells the |
@@ -244,7 +245,17 @@ | |||
244 | * this. | 245 | * this. |
245 | */ | 246 | */ |
246 | #define __visible __attribute__((externally_visible)) | 247 | #define __visible __attribute__((externally_visible)) |
247 | #endif | 248 | |
249 | /* | ||
250 | * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only | ||
251 | * possible since GCC 4.6. To provide as much build testing coverage | ||
252 | * as possible, this is used for all GCC 4.6+ builds, and not just on | ||
253 | * RANDSTRUCT_PLUGIN builds. | ||
254 | */ | ||
255 | #define randomized_struct_fields_start struct { | ||
256 | #define randomized_struct_fields_end } __randomize_layout; | ||
257 | |||
258 | #endif /* GCC_VERSION >= 40600 */ | ||
248 | 259 | ||
249 | 260 | ||
250 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) | 261 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) |