From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C8789A00E6 for ; Thu, 16 May 2019 20:22:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 863E85B12; Thu, 16 May 2019 20:22:16 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id B6D515B12 for ; Thu, 16 May 2019 20:22:14 +0200 (CEST) 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 mx1.redhat.com (Postfix) with ESMTPS id F30B881E0F; Thu, 16 May 2019 18:22:13 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F89E60E39; Thu, 16 May 2019 18:22:10 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: bruce.richardson@intel.com, reshma.pattan@intel.com, David Marchand Date: Thu, 16 May 2019 19:21:55 +0100 Message-Id: <20190516182157.32128-2-ktraynor@redhat.com> In-Reply-To: <20190516182157.32128-1-ktraynor@redhat.com> References: <20190516182157.32128-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 16 May 2019 18:22:14 +0000 (UTC) Subject: [dpdk-stable] [PATCH 18.11 1/3] mk: disable warning for packed member pointer 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" From: Reshma Pattan [ upstream commit a385972c3675dd2b4792ab5b3cf7a536e6f9846c ] gcc 9 on Fedora 30 gives an error "taking address of packed member may result in an unaligned pointer value" warnings. For clang builds this warning is already disabled, so disable "-Waddress-of-packed-member" for gcc builds also. Snippet of build error: lib/librte_eal/linux/eal/eal_memalloc.c: In function ‘alloc_seg_walk’: lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: taking address of packed member of ‘struct rte_mem_config’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 768 | cur_msl = &mcfg->memsegs[msl_idx]; | ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Reshma Pattan Tested-by: David Marchand --- mk/toolchain/gcc/rte.vars.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index d8b99faf6..b852fcfd7 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -88,4 +88,7 @@ WERROR_FLAGS += -Wno-format-truncation endif +# disable packed member unalign warnings +WERROR_FLAGS += -Wno-address-of-packed-member + export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS -- 2.20.1