From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E922A0093 for ; Tue, 19 May 2020 15:12:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 702351D8DA; Tue, 19 May 2020 15:12:56 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 8DDDC1D8D6 for ; Tue, 19 May 2020 15:12:55 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id z72so3519123wmc.2 for ; Tue, 19 May 2020 06:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QXfEi9kOQ/ODGrkyTSVCtslkcn9Sl8t9+0POnqltfTU=; b=e0gqM4HFb6JQuixCsaXnJTvwM+Aq0rpy7WvBFCQUjBnXR6htOMb9SV5bYaoO2esMzi KkxSiFQs+9wwEvjyJ95qjcIy1PHyGj/qQQnStb9WSbPqDKZRFg8t25ZrBVtdQLd7fpMB X+8apkN0Wu8m+mrUU1CAXBy/q/x+X2DLeqdaFAixhGGU+N8RKj/GDeRBFE2FhmSXrl9T 3t4uQHO7wNfozwCiRfpZD2SBeMGyU1gmD49wEZ1zVSCuQesiw1IQUCvMykQANiEFg1Ph zGEaLLF/tXCh62OWtAr7inY5Es/0jIONQMyIk2WS6LaV5KDKR6P3zpUz80GYKywetuLk gnQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QXfEi9kOQ/ODGrkyTSVCtslkcn9Sl8t9+0POnqltfTU=; b=rGnYUsdrKTMkwJKK1WYXMGT5KxRreR6Iv1/eD+T60oMmo6cjqvLNCLBThYLSagXOTp bKs0qgDPssnJmav0sRTe+8vNE3UPtL0nvC/KwW8Le3S0fBYQISiENQfn0l0tm2BnAggG mYEFb1yxUuOHX1qWXxME8F3MitmGO9LcqI97WcaVIbxtq7OLMiWILU8/LmbsKgby79Ku Vvzy4xj9eu6wqroscEMM39nCT8Jz2utDCXuy26LpNV9jTvGoO+tXd8/oYluk5XQMnvva Ybo8IFvF/cdBemeG1AQpzASwz+CWrxtH+wfe4JipRIx38o+TR05HF1IgBE7yCVHxfwqx oxAQ== X-Gm-Message-State: AOAM531GqC1JNGQkDPkeX427qZAcLdnGwmDi1zl23o6SGxoaOVJ8KbIi H2kxlwlp7BS+PbCkvsg6V9v0ucksi5GR5dLV X-Google-Smtp-Source: ABdhPJy35o/o/aKPBQZC7UvhDtgsYhjkAEdNttp1gyB1KCW+M4mBCuZm6mzcNnmktTpF/NRqd16wOA== X-Received: by 2002:a1c:3984:: with SMTP id g126mr5207931wma.169.1589893975135; Tue, 19 May 2020 06:12:55 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v205sm3944318wmg.11.2020.05.19.06.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:12:54 -0700 (PDT) From: luca.boccassi@gmail.com To: David Christensen Cc: dpdk stable Date: Tue, 19 May 2020 14:04:30 +0100 Message-Id: <20200519130549.112823-135-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal/ppc: fix build with gcc 9.3' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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. Thanks. Luca Boccassi --- >From a131ab7d0f2fb6ab35e9e556f7630a607be9eefe Mon Sep 17 00:00:00 2001 From: David Christensen 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 --- .../common/include/arch/ppc_64/rte_memcpy.h | 11 +++++++++++ 1 file changed, 11 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 25311ba1d7..02188e79bc 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 @@ -11,12 +11,19 @@ /*To include altivec.h, GCC version must >= 4.8 */ #include +#include "rte_common.h" + #ifdef __cplusplus extern "C" { #endif #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 +199,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 -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:49.936695226 +0100 +++ 0135-eal-ppc-fix-build-with-gcc-9.3.patch 2020-05-19 14:04:44.444652506 +0100 @@ -1,8 +1,10 @@ -From 67889d11306a6e531be8d2fe53bc216172b90f5d Mon Sep 17 00:00:00 2001 +From a131ab7d0f2fb6ab35e9e556f7630a607be9eefe Mon Sep 17 00:00:00 2001 From: David Christensen 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 @@ -13,26 +15,24 @@ Modify the code to disable the array-bounds check for GCC versions 9.0 to 9.3. -Cc: stable@dpdk.org - Signed-off-by: David Christensen --- - lib/librte_eal/ppc/include/rte_memcpy.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) + .../common/include/arch/ppc_64/rte_memcpy.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) -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 -@@ -10,6 +10,7 @@ - #include +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 25311ba1d7..02188e79bc 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 +@@ -11,12 +11,19 @@ + /*To include altivec.h, GCC version must >= 4.8 */ + #include - #include "rte_altivec.h" +#include "rte_common.h" - ++ #ifdef __cplusplus extern "C" { -@@ -17,6 +18,11 @@ extern "C" { + #endif #include "generic/rte_memcpy.h" @@ -44,7 +44,7 @@ static inline void rte_mov16(uint8_t *dst, const uint8_t *src) { -@@ -192,6 +198,10 @@ rte_memcpy_func(void *dst, const void *src, size_t n) +@@ -192,6 +199,10 @@ rte_memcpy_func(void *dst, const void *src, size_t n) return ret; }