On Mon, 2017-07-03 at 22:51 +0200, Thomas Monjalon wrote: > 12/05/2017 12:15, Ashwin Sekhar T K: > > > > Moved the definition of GCC_VERSION from lib/librte_table/rte_lru.h > > to lib/librte_eal/common/include/rte_common.h. > > > > Tested compilation on: > > * arm64 with gcc > > * x86 with gcc and clang > > > > Signed-off-by: Ashwin Sekhar T K <ashwin.sek...@caviumnetworks.com> > > Reviewed-by: Jan Viktorin <vikto...@rehivetech.com> > > --- > > --- a/lib/librte_eal/common/include/rte_common.h > > +++ b/lib/librte_eal/common/include/rte_common.h > > +/** Define GCC_VERSION **/ > > +#ifdef RTE_TOOLCHAIN_GCC > > +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + > > \ > > + __GNUC_PATCHLEVEL__) > > +#endif > [...] > > > > --- a/lib/librte_table/rte_lru.h > > +++ b/lib/librte_table/rte_lru.h > > -#ifdef __INTEL_COMPILER > > -#define GCC_VERSION (0) > > -#else > > -#define GCC_VERSION (__GNUC__ * 10000+__GNUC_MINOR__*100 + > > __GNUC_PATCHLEVEL__) > > -#endif > The ICC check is lost when moving in rte_common.h.
All usage of GCC_VERSION is kept under #ifdef RTE_TOOLCHAIN_GCC. So the ICC check is not required. Ashwin