diff options
-rw-r--r-- | include/linux/compiler-gcc.h | 4 | ||||
-rw-r--r-- | include/linux/compiler.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index abbac368aa1c..28d01f79636e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -206,6 +206,10 @@ #endif #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +#if GCC_VERSION >= 90100 +#define __copy(symbol) __attribute__((__copy__(symbol))) +#endif + #endif /* gcc version >= 40000 specific checks */ #if !defined(__noclone) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index fe7a686dfd8d..25dca0de114e 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -275,6 +275,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); # define __attribute_const__ /* unimplemented */ #endif +#ifndef __copy +# define __copy(symbol) +#endif + /* * Tell gcc if a function is cold. The compiler will assume any path * directly leading to the call is unlikely. |