[dpdk-stable] patch 'build: disable gcc 10 zero-length-bounds warning' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:24:50 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/10/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/8fd2868e3fa6d81f13a24fa30955c181f6f699f1

Thanks.

Kevin.

---
>From 8fd2868e3fa6d81f13a24fa30955c181f6f699f1 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor at redhat.com>
Date: Thu, 14 May 2020 14:18:57 +0100
Subject: [PATCH] build: disable gcc 10 zero-length-bounds warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit cfacbcb5a23bc26cb913528c372adddabbb33ca1 ]

gcc 10 issues warnings about the use of rearm_data marker
from struct rte_mbuf.

e.g.
../drivers/net/enic/enic_rxtx_vec_avx2.c: In function ‘rx_one’:
../drivers/net/enic/enic_rxtx_vec_avx2.c:21:2:
warning:
array subscript 0 is outside the bounds of an interior zero-length array
‘RTE_MARKER64’ {aka ‘long unsigned int[0]’} [-Wzero-length-bounds]
   21 |  *(uint64_t *)&mb->rearm_data = enic->mbuf_initializer;
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/librte_mbuf/rte_mbuf.h:45,
                 from ../drivers/net/enic/enic_rxtx_vec_avx2.c:6:
../lib/librte_mbuf/rte_mbuf_core.h:484:15:
note: while referencing ‘rearm_data’
  484 |  RTE_MARKER64 rearm_data;
      |

Disable this warning for gcc 10 in order to allow v20.05 to build
without changes to struct rte_mbuf.

Bugzilla ID: 396

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 config/meson.build           | 4 ++++
 mk/toolchain/gcc/rte.vars.mk | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index 616af97466..88742ce9db 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -112,4 +112,8 @@ warning_flags = [
 	'-Wno-address-of-packed-member'
 ]
+if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0')
+# FIXME: Bugzilla 396
+	warning_flags += '-Wno-zero-length-bounds'
+endif
 if not dpdk_conf.get('RTE_ARCH_64')
 # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index b852fcfd7e..50f5e6f58d 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -72,4 +72,9 @@ WERROR_FLAGS += -Wno-uninitialized
 endif
 
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+# FIXME: Bugzilla 396
+WERROR_FLAGS += -Wno-zero-length-bounds
+endif
+
 HOST_WERROR_FLAGS := $(WERROR_FLAGS)
 
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:53.726330456 +0100
+++ 0053-build-disable-gcc-10-zero-length-bounds-warning.patch	2020-06-05 19:20:50.860039677 +0100
@@ -1 +1 @@
-From cfacbcb5a23bc26cb913528c372adddabbb33ca1 Mon Sep 17 00:00:00 2001
+From 8fd2868e3fa6d81f13a24fa30955c181f6f699f1 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit cfacbcb5a23bc26cb913528c372adddabbb33ca1 ]
+
@@ -31 +32,0 @@
-Cc: stable at dpdk.org
@@ -41 +42 @@
-index a1c38c053e..43ab113106 100644
+index 616af97466..88742ce9db 100644
@@ -44,2 +45,2 @@
-@@ -209,4 +209,8 @@ warning_flags = [
- 	'-Wno-missing-field-initializers'
+@@ -112,4 +112,8 @@ warning_flags = [
+ 	'-Wno-address-of-packed-member'
@@ -54 +55 @@
-index f19305e495..928f0e0830 100644
+index b852fcfd7e..50f5e6f58d 100644
@@ -57 +58 @@
-@@ -82,4 +82,9 @@ WERROR_FLAGS += -Wno-uninitialized
+@@ -72,4 +72,9 @@ WERROR_FLAGS += -Wno-uninitialized



More information about the stable mailing list