diff options
| -rw-r--r-- | include/linux/compiler-gcc4.h | 7 | ||||
| -rw-r--r-- | include/linux/compiler.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 2f4079175afb..934bc34d5f99 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -49,6 +49,13 @@ | |||
| 49 | #endif | 49 | #endif |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #if __GNUC_MINOR__ >= 6 | ||
| 53 | /* | ||
| 54 | * Tell the optimizer that something else uses this function or variable. | ||
| 55 | */ | ||
| 56 | #define __visible __attribute__((externally_visible)) | ||
| 57 | #endif | ||
| 58 | |||
| 52 | #if __GNUC_MINOR__ > 0 | 59 | #if __GNUC_MINOR__ > 0 |
| 53 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 60 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
| 54 | #endif | 61 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 923d093c9cea..f430e4162f41 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -278,6 +278,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 278 | # define __section(S) __attribute__ ((__section__(#S))) | 278 | # define __section(S) __attribute__ ((__section__(#S))) |
| 279 | #endif | 279 | #endif |
| 280 | 280 | ||
| 281 | #ifndef __visible | ||
| 282 | #define __visible | ||
| 283 | #endif | ||
| 284 | |||
| 281 | /* Are two types/vars the same type (ignoring qualifiers)? */ | 285 | /* Are two types/vars the same type (ignoring qualifiers)? */ |
| 282 | #ifndef __same_type | 286 | #ifndef __same_type |
| 283 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | 287 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
