[dpdk-stable] patch 'eal/ppc: fix build with gcc 9.3' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:24:04 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/7976550a663afd20a3cc64b8f4890770521c926c

Thanks.

Kevin.

---
>From 7976550a663afd20a3cc64b8f4890770521c926c Mon Sep 17 00:00:00 2001
From: David Christensen <drc at linux.vnet.ibm.com>
Date: Mon, 4 May 2020 14:03:47 -0700
Subject: [PATCH] eal/ppc: fix build with gcc 9.3

[ upstream commit 67889d11306a6e531be8d2fe53bc216172b90f5d ]

Building DPDK on Ubuntu 20.04 with GCC 9.3.0 results in a "subscript is
outside array bounds" message in rte_memcpy function.  The build error
is caused by an interaction between __builtin_constant_p and
"-Werror=array-bounds" as described in this bugzilla:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90387

Modify the code to disable the array-bounds check for GCC versions 9.0
to 9.3.

Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
---
 lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
index 75f74897b3..b194564b55 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
@@ -38,4 +38,5 @@
 /*To include altivec.h, GCC version must  >= 4.8 */
 #include <altivec.h>
+#include "rte_common.h"
 
 #ifdef __cplusplus
@@ -45,4 +46,9 @@ extern "C" {
 #include "generic/rte_memcpy.h"
 
+#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
 static inline void
 rte_mov16(uint8_t *dst, const uint8_t *src)
@@ -220,4 +226,8 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
 }
 
+#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#pragma GCC diagnostic pop
+#endif
+
 #ifdef __cplusplus
 }
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:51.329987618 +0100
+++ 0007-eal-ppc-fix-build-with-gcc-9.3.patch	2020-06-05 19:20:50.707043153 +0100
@@ -1 +1 @@
-From 67889d11306a6e531be8d2fe53bc216172b90f5d Mon Sep 17 00:00:00 2001
+From 7976550a663afd20a3cc64b8f4890770521c926c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 67889d11306a6e531be8d2fe53bc216172b90f5d ]
+
@@ -16,2 +17,0 @@
-Cc: stable at dpdk.org
-
@@ -20 +20 @@
- lib/librte_eal/ppc/include/rte_memcpy.h | 10 ++++++++++
+ lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h | 10 ++++++++++
@@ -23,7 +23,7 @@
-diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
-index d685b7b15b..c2a1f356d5 100644
---- a/lib/librte_eal/ppc/include/rte_memcpy.h
-+++ b/lib/librte_eal/ppc/include/rte_memcpy.h
-@@ -11,4 +11,5 @@
- 
- #include "rte_altivec.h"
+diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
+index 75f74897b3..b194564b55 100644
+--- a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
++++ b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
+@@ -38,4 +38,5 @@
+ /*To include altivec.h, GCC version must  >= 4.8 */
+ #include <altivec.h>
@@ -33 +33 @@
-@@ -18,4 +19,9 @@ extern "C" {
+@@ -45,4 +46,9 @@ extern "C" {
@@ -43 +43 @@
-@@ -193,4 +199,8 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
+@@ -220,4 +226,8 @@ rte_memcpy_func(void *dst, const void *src, size_t n)



More information about the stable mailing list