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 A2029A0AC5 for ; Thu, 2 May 2019 11:33:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 807662C6A; Thu, 2 May 2019 11:33:40 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 252C12C55 for ; Thu, 2 May 2019 11:33:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 02:33:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,421,1549958400"; d="scan'208";a="147620422" Received: from silpixa00400214.ir.intel.com (HELO silpixa00400214.ger.corp.intel.com) ([10.237.223.195]) by fmsmga007.fm.intel.com with ESMTP; 02 May 2019 02:33:37 -0700 From: Reshma Pattan To: dev@dpdk.org Cc: Reshma Pattan Date: Thu, 2 May 2019 10:33:34 +0100 Message-Id: <20190502093334.7546-1-reshma.pattan@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30 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" Message-ID: <20190502093334.6T1Dh-KNZkKtDkOLMFP1PABZjbJYsLvKQo57-KD2p-s@z> 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 --- 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 @@ -87,5 +87,8 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2 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.21.0