From: Thomas Monjalon <thomas@monjalon.net>
To: bruce.richardson@intel.com, Matan Azrad <matan@mellanox.com>,
Shahaf Shuler <shahafs@mellanox.com>,
Yongseok Koh <yskoh@mellanox.com>,
Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Cc: dev@dpdk.org, adrien.mazarguil@6wind.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc
Date: Tue, 13 Aug 2019 01:03:56 +0200 [thread overview]
Message-ID: <20190812230358.988-5-thomas@monjalon.net> (raw)
In-Reply-To: <20190812230358.988-1-thomas@monjalon.net>
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: adrien.mazarguil@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/mlx4/Makefile | 3 ++-
drivers/net/mlx5/Makefile | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index 8126b0dfc..25d7c7555 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -68,6 +68,7 @@ endif
# User-defined CFLAGS.
ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG),y)
CFLAGS += -pedantic -UNDEBUG -DPEDANTIC
+AUTO_CONFIG_CFLAGS += -Wno-pedantic
else
CFLAGS += -DNDEBUG -UPEDANTIC
endif
@@ -77,7 +78,7 @@ include $(RTE_SDK)/mk/rte.lib.mk
# Generate and clean-up mlx4_autoconf.h.
export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
-export AUTO_CONFIG_CFLAGS = -Wno-error
+export AUTO_CONFIG_CFLAGS += -Wno-error
ifndef V
AUTOCONF_OUTPUT := >/dev/null
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index dbb2a4e80..299cf3afe 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -83,6 +83,7 @@ endif
# User-defined CFLAGS.
ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DEBUG),y)
CFLAGS += -pedantic -UNDEBUG -DPEDANTIC
+AUTO_CONFIG_CFLAGS += -Wno-pedantic
else
CFLAGS += -DNDEBUG -UPEDANTIC
endif
@@ -92,7 +93,7 @@ include $(RTE_SDK)/mk/rte.lib.mk
# Generate and clean-up mlx5_autoconf.h.
export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
-export AUTO_CONFIG_CFLAGS = -Wno-error
+export AUTO_CONFIG_CFLAGS += -Wno-error
ifndef V
AUTOCONF_OUTPUT := >/dev/null
--
2.22.0
next prev parent reply other threads:[~2019-08-12 23:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
2019-08-12 23:03 ` [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig Thomas Monjalon
2019-08-13 9:37 ` Luca Boccassi
2019-08-12 23:03 ` [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling Thomas Monjalon
2019-08-13 9:38 ` Luca Boccassi
2019-08-12 23:03 ` [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path Thomas Monjalon
2019-08-13 9:38 ` Luca Boccassi
2019-08-14 8:39 ` Matan Azrad
2019-08-12 23:03 ` Thomas Monjalon [this message]
2019-08-13 9:39 ` [dpdk-dev] [dpdk-stable] [PATCH 4/6] net/mlx: fix build with make and recent gcc Luca Boccassi
2019-08-14 10:19 ` [dpdk-dev] " Matan Azrad
2019-08-12 23:03 ` [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once Thomas Monjalon
2019-08-13 9:40 ` Luca Boccassi
2019-08-12 23:03 ` [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment Thomas Monjalon
2019-08-13 9:41 ` Luca Boccassi
2019-09-12 16:23 ` [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190812230358.988-5-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=adrien.mazarguil@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=shahafs@mellanox.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@mellanox.com \
--cc=yskoh@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).