-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools include: Introduce linux/compiler-gcc.h
To match the kernel headers structure, setting up things that are specific to gcc or to some specific version of gcc. It gets included by linux/compiler.h when gcc is the compiler being used. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Joe Perches <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef _TOOLS_LINUX_COMPILER_H_ | ||
#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead." | ||
#endif | ||
|
||
/* | ||
* Common definitions for all gcc versions go here. | ||
*/ | ||
#define GCC_VERSION (__GNUC__ * 10000 \ | ||
+ __GNUC_MINOR__ * 100 \ | ||
+ __GNUC_PATCHLEVEL__) | ||
|
||
#if GCC_VERSION >= 70000 && !defined(__CHECKER__) | ||
# define __fallthrough __attribute__ ((fallthrough)) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters