Messages in this thread | | | Subject | Re: [PATCH] gcc: clamp gcc version to most highest specific header version available | From | Joe Perches <> | Date | Fri, 05 Sep 2014 14:09:24 -0700 |
| |
On Fri, 2014-09-05 at 22:39 +0200, Hannes Frederic Sowa wrote: > As announced in [1] gcc will increase its major number yearly but we don't > need to include gcc version specific quirks for every version normally. > > This patch allows to compile every kernel with all new versions of gcc > without adding a specific compiler-gccX.h header. We do so by clamping > the __GNUC__ version to the most specific version dependent header file. > > If someone adds a new gccX.h file __GCC_CLAMP_VERSION_HEADER also needs > to be modified. > > The decision if chained including of header files (e.g. gcc5.h includes > gcc4.h) is necessary or should be avoided can be postponed until more > experience in using the official gcc release is gained.
I think the churn rate in the gcc compiler specific #include headers will be low enough that a single combined file should be acceptable.
Keeping all the gcc #defines together seems more readable to me.
The trivial integration I did eliminated one duplicate #define as well as that hack for #include gcc_header(__GNUC__)
| |