net/mlx: fix build with make and recent gcc
authorThomas Monjalon <thomas@monjalon.net>
Mon, 12 Aug 2019 23:03:56 +0000 (01:03 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Sep 2019 16:32:40 +0000 (18:32 +0200)
commitb38a54aeb16cb36e42d638c4335b8314aa0b1794
tree4dae68d1cb655ed7bbcaa0b8db2b60068a1451f8
parentde38dd8cf5e60d9d87eefe9f2cb60a35d4d86705
net/mlx: fix build with make and recent gcc

With VERBOSE=1, this error was seen in debug mode with gcc 9.1:

In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
In file included from rdma-core/build/include/infiniband/verbs.h:46:
In file included from rdma-core/build/include/infiniband/verbs_api.h:66:
In file included from rdma-core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
include/rdma/ib_user_verbs.h:161:28: fatal error:
zero size arrays are an extension [-Wzero-length-array]
__aligned_u64 driver_data0;
^
1 error generated.

As a result, buildtools/auto-config-h.sh was not generating
a correct autoconf file, so the compilation was generating such error:

fatal error: redefinition of 'mlx5_ib_uapi_flow_action_packet_reformat_type'

It is fixed by disabling -pedantic option when calling auto-config-h.sh
from the makefile-based system.

Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx4/Makefile
drivers/net/mlx5/Makefile