diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-09-06 01:59:18 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-09-06 01:59:18 +0200 |
commit | 3487dcbe0e993929df1925f5cd774250b43bfd38 (patch) | |
tree | dcfff79df96a13c437e782de37dee595bc32040d | |
parent | efe93c7691aae95d7ba8a7e1a386cf54bda80ed4 (diff) |
compiler-gcc*.h: Keep on the gcc 5 version for now
We can introduce other versions if we ever need to (which is unlikely
since we plan to get rid of the Linux drivers).
* compiler-gcc.h: Include compiler-gcc5.h for all compiler versions starting
from gcc 5.
* compiler-gcc6.h, compiler-gcc7.h, compiler-gcc8.h, compiler-gcc9.h:
Remove.
5 files changed, 4 insertions, 100 deletions
diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc.h b/libdde_linux26/contrib/include/linux/compiler-gcc.h index a3ed7cb8c..67f4db4db 100644 --- a/libdde_linux26/contrib/include/linux/compiler-gcc.h +++ b/libdde_linux26/contrib/include/linux/compiler-gcc.h @@ -83,4 +83,8 @@ #define __gcc_header(x) #x #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) #define gcc_header(x) _gcc_header(x) +#if __GNUC__ < 5 #include gcc_header(__GNUC__) +#else +#include gcc_header(5) +#endif diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc6.h b/libdde_linux26/contrib/include/linux/compiler-gcc6.h deleted file mode 100644 index e1d96fc07..000000000 --- a/libdde_linux26/contrib/include/linux/compiler-gcc6.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead." -#endif - -#define __used __attribute__((__used__)) -#define __must_check __attribute__((warn_unused_result)) -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) -#define __always_inline inline __attribute__((always_inline)) - -/* - * A trick to suppress uninitialized variable warning without generating any - * code - */ -#define uninitialized_var(x) x = x - -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of manual unlikely()s - are unnecessary now for any paths leading to the usual suspects - like BUG(), printk(), panic() etc. [but let's keep them for now for - older compilers] - - gcc also has a __attribute__((__hot__)) to move hot functions into - a special section, but I don't see any sense in this right now in - the kernel context */ -#define __cold __attribute__((__cold__)) diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc7.h b/libdde_linux26/contrib/include/linux/compiler-gcc7.h deleted file mode 100644 index 125834e1f..000000000 --- a/libdde_linux26/contrib/include/linux/compiler-gcc7.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include <linux/compiler-gcc7.h> directly, include <linux/compiler.h> instead." -#endif - -#define __used __attribute__((__used__)) -#define __must_check __attribute__((warn_unused_result)) -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) -#define __always_inline inline __attribute__((always_inline)) - -/* - * A trick to suppress uninitialized variable warning without generating any - * code - */ -#define uninitialized_var(x) x = x - -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of manual unlikely()s - are unnecessary now for any paths leading to the usual suspects - like BUG(), printk(), panic() etc. [but let's keep them for now for - older compilers] - - gcc also has a __attribute__((__hot__)) to move hot functions into - a special section, but I don't see any sense in this right now in - the kernel context */ -#define __cold __attribute__((__cold__)) diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc8.h b/libdde_linux26/contrib/include/linux/compiler-gcc8.h deleted file mode 100644 index accf892e2..000000000 --- a/libdde_linux26/contrib/include/linux/compiler-gcc8.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include <linux/compiler-gcc8.h> directly, include <linux/compiler.h> instead." -#endif - -#define __used __attribute__((__used__)) -#define __must_check __attribute__((warn_unused_result)) -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) -#define __always_inline inline __attribute__((always_inline)) - -/* - * A trick to suppress uninitialized variable warning without generating any - * code - */ -#define uninitialized_var(x) x = x - -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of manual unlikely()s - are unnecessary now for any paths leading to the usual suspects - like BUG(), printk(), panic() etc. [but let's keep them for now for - older compilers] - - gcc also has a __attribute__((__hot__)) to move hot functions into - a special section, but I don't see any sense in this right now in - the kernel context */ -#define __cold __attribute__((__cold__)) diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc9.h b/libdde_linux26/contrib/include/linux/compiler-gcc9.h deleted file mode 100644 index 7b10fa5dd..000000000 --- a/libdde_linux26/contrib/include/linux/compiler-gcc9.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include <linux/compiler-gcc9.h> directly, include <linux/compiler.h> instead." -#endif - -#define __used __attribute__((__used__)) -#define __must_check __attribute__((warn_unused_result)) -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) -#define __always_inline inline __attribute__((always_inline)) - -/* - * A trick to suppress uninitialized variable warning without generating any - * code - */ -#define uninitialized_var(x) x = x - -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of manual unlikely()s - are unnecessary now for any paths leading to the usual suspects - like BUG(), printk(), panic() etc. [but let's keep them for now for - older compilers] - - gcc also has a __attribute__((__hot__)) to move hot functions into - a special section, but I don't see any sense in this right now in - the kernel context */ -#define __cold __attribute__((__cold__)) |