[dpdk-dev] [PATCH v5 2/4] eal: move gcc version definition to common header

Thomas Monjalon thomas at monjalon.net
Mon Jul 3 22:51:48 CEST 2017


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.sekhar at caviumnetworks.com>
> Reviewed-by: Jan Viktorin <viktorin at 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.


More information about the dev mailing list