[dpdk-dev] [PATCH v2] net/mlx: remove pedantic definition for icc

Ferruh Yigit ferruh.yigit at intel.com
Wed Oct 23 22:03:10 CEST 2019


On 10/23/2019 12:31 PM, Raslan Darawsheh wrote:
> Trying to compile mlx5 pmd in debug mode with icc
> will lead to compilation failures due to the fact that
> icc doesn't have support for the pragma of pedantic.

What would you think about following patch title:

net/mlx: fix icc build

And should this patch backprted?

> 
> Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> ---
> 	v2: add commit description
> ---
> ---
>  drivers/net/mlx4/Makefile | 5 ++++-
>  drivers/net/mlx5/Makefile | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
> index 25d7c75..0abdc8d 100644
> --- a/drivers/net/mlx4/Makefile
> +++ b/drivers/net/mlx4/Makefile
> @@ -67,7 +67,10 @@ endif
>  
>  # User-defined CFLAGS.
>  ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG),y)
> -CFLAGS += -pedantic -UNDEBUG -DPEDANTIC
> +CFLAGS += -pedantic -UNDEBUG
> +ifneq ($(CONFIG_RTE_TOOLCHAIN), "icc")

Can use "CONFIG_RTE_TOOLCHAIN_ICC" directly for check.

> +CFLAGS += -DPEDANTIC
> +endif
>  AUTO_CONFIG_CFLAGS += -Wno-pedantic
>  else
>  CFLAGS += -DNDEBUG -UPEDANTIC
> diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
> index 04de93a..0369ee6 100644
> --- a/drivers/net/mlx5/Makefile
> +++ b/drivers/net/mlx5/Makefile
> @@ -83,7 +83,10 @@ endif
>  
>  # User-defined CFLAGS.
>  ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DEBUG),y)
> -CFLAGS += -pedantic -UNDEBUG -DPEDANTIC
> +CFLAGS += -pedantic -UNDEBUGi

I guess you are a 'vim' user :)

> +ifneq ($(CONFIG_RTE_TOOLCHAIN), "icc")
> +CFLAGS += -DPEDANTIC
> +endif
>  AUTO_CONFIG_CFLAGS += -Wno-pedantic
>  else
>  CFLAGS += -DNDEBUG -UPEDANTIC
> 



More information about the dev mailing list