From: Ferruh Yigit <ferruh.yigit@intel.com>
To: David Christensen <drc@linux.vnet.ibm.com>, dev@dpdk.org
Cc: "Michał Krawczyk" <mk@semihalf.com>,
mw@semihalf.com, "Tzalik, Guy" <gtzalik@amazon.com>,
"Evgeny Schemeilin" <evgenys@amazon.com>,
igorch@amazon.com, "Andrew Rybchenko" <arybchenko@solarflare.com>
Subject: Re: [dpdk-dev] [PATCH v2] eal: fix rte_memcpy build on ppc with gcc 9.3
Date: Tue, 5 May 2020 11:33:48 +0100 [thread overview]
Message-ID: <18ecc473-3d80-a232-963f-19e34c021e72@intel.com> (raw)
In-Reply-To: <20200504210347.24094-1-drc@linux.vnet.ibm.com>
On 5/4/2020 10:03 PM, David Christensen wrote:
> 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@linux.vnet.ibm.com>
> ---
>
> v2:
> * Replace __GNUC__ and __GNUC_MINOR__ with GCC_VERSION
> ---
> lib/librte_eal/ppc/include/rte_memcpy.h | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
> index 25311ba1d..de47a5d2e 100644
> --- a/lib/librte_eal/ppc/include/rte_memcpy.h
> +++ b/lib/librte_eal/ppc/include/rte_memcpy.h
> @@ -8,8 +8,8 @@
>
> #include <stdint.h>
> #include <string.h>
> -/*To include altivec.h, GCC version must >= 4.8 */
> -#include <altivec.h>
> +#include "rte_altivec.h"
> +#include "rte_common.h"
I can't find "rte_altivec.h", am I missing something.
With just ignoring "-Warray-bounds" changes, I confirm ena build issue is fixed
with gcc 9.1
>
> #ifdef __cplusplus
> extern "C" {
> @@ -17,6 +17,11 @@ 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)
> {
> @@ -192,6 +197,10 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
> return ret;
> }
>
> +#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
> +#pragma GCC diagnostic pop
> +#endif
> +
> #ifdef __cplusplus
> }
> #endif
>
next prev parent reply other threads:[~2020-05-05 10:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 17:45 [dpdk-dev] [PATCH] " David Christensen
2020-05-04 21:03 ` [dpdk-dev] [PATCH v2] " David Christensen
2020-05-05 10:33 ` Ferruh Yigit [this message]
2020-05-05 16:32 ` David Christensen
2020-05-05 16:41 ` David Marchand
2020-05-05 20:28 ` David Christensen
2020-05-06 9:35 ` David Marchand
2020-05-06 15:59 ` David Christensen
2020-05-05 18:42 ` Ferruh Yigit
2020-05-05 20:37 ` David Christensen
2020-05-06 9:23 ` Ferruh Yigit
2020-05-06 16:13 ` David Marchand
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=18ecc473-3d80-a232-963f-19e34c021e72@intel.com \
--to=ferruh.yigit@intel.com \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=drc@linux.vnet.ibm.com \
--cc=evgenys@amazon.com \
--cc=gtzalik@amazon.com \
--cc=igorch@amazon.com \
--cc=mk@semihalf.com \
--cc=mw@semihalf.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).