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 6B39FA0352; Thu, 14 May 2020 15:19:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4BD0E1D71A; Thu, 14 May 2020 15:19:32 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 9FED61D6AC for ; Thu, 14 May 2020 15:19:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589462370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IIjGJ7CIM7DJsgxigol1MQcmu1yHEO11ft1zpseCuFQ=; b=i6bB7nS3lvoKB1ShD/p/QPumM4jeT0J5WrkI9FmRbqgjqfDvcfYfwLf6iEhcZ4BunsdeVb gADPUqcG9FL1YdzVZ6PvVv9GAFZeHp2Sisx1mCd4j0JHwZmiB2GerjBKltwgvYVt8hfIwK +u0k3bQTpubl+CVLy0EwnvN/bNnoiJU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-483-VemOY8uDOYOM52VGHD9VnQ-1; Thu, 14 May 2020 09:19:22 -0400 X-MC-Unique: VemOY8uDOYOM52VGHD9VnQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BDE72A0C01; Thu, 14 May 2020 13:19:20 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id E784A60F8D; Thu, 14 May 2020 13:19:14 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org, thomas@monjalon.net, bruce.richardson@intel.com Cc: ferruh.yigit@intel.com, david.marchand@redhat.com, Gavin.Hu@arm.com, Honnappa.Nagarahalli@arm.com, olivier.matz@6wind.com, Kevin Traynor , stable@dpdk.org Date: Thu, 14 May 2020 14:18:57 +0100 Message-Id: <20200514131857.11966-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] build: disable gcc 10 zero-length-bounds warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Cc: stable@dpdk.org Signed-off-by: Kevin Traynor --- Sending as per discussion at this mornings release meeting: http://inbox.dpdk.org/dev/2980eb50-124c-9da8-9927-0678081b652b@intel.com/ Reference to Gavin's patch: http://inbox.dpdk.org/dev/CAJFAV8yL2GvEJtTXOLk6o0eXHi4CpZmqCoRsfN2WcDe_ju1C8A@mail.gmail.com/#t --- 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 a1c38c053..43ab11310 100644 --- a/config/meson.build +++ b/config/meson.build @@ -209,4 +209,8 @@ warning_flags = [ '-Wno-missing-field-initializers' ] +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 f19305e49..928f0e083 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -82,4 +82,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