Compiler Attributes: naked can be shared
authorMiguel Ojeda <[email protected]>
Tue, 18 Sep 2018 16:55:42 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <[email protected]>
Thu, 20 Sep 2018 13:23:58 +0000 (15:23 +0200)
commitae596de1a0c8c2c924dc99d23c026259372ab234
treea00eb3a2e9304e03179bdee068a1e8fdcaef8b03
parentd124b44f09cab67fc6da4a4513417e3e54b01efc
Compiler Attributes: naked can be shared

The naked attribute is supported by at least gcc >= 4.6 (for ARM,
which is the only current user), gcc >= 8 (for x86), clang >= 3.1
and icc >= 13. See https://godbolt.org/z/350Dyc

Therefore, move it out of compiler-gcc.h so that the definition
is shared by all compilers.

This also fixes Clang support for ARM32 --- 815f0ddb346c
("include/linux/compiler*.h: make compiler-*.h mutually exclusive").

Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive")
Cc: Rasmus Villemoes <[email protected]>
Cc: Eli Friedman <[email protected]>
Cc: Christopher Li <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Dominique Martinet <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: [email protected]
Suggested-by: Arnd Bergmann <[email protected]>
Tested-by: Stefan Agner <[email protected]>
Reviewed-by: Stefan Agner <[email protected]>
Reviewed-by: Luc Van Oostenryck <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
include/linux/compiler-gcc.h
include/linux/compiler_types.h