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 426FBA0AC5 for ; Thu, 2 May 2019 17:00:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 129807EC7; Thu, 2 May 2019 17:00:22 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 6C13B7D05 for ; Thu, 2 May 2019 17:00:20 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id z145so1570171vsc.0 for ; Thu, 02 May 2019 08:00:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JIFzrHc3riUBNlp854oiSc//O9YO98vaqroChL27Ws8=; b=VqCD4buyys66YDX+IRGl5mahlOJ7vS7yGaHdV57LbRg2C0+vE5Ubu1V25PUFqBIePG yPnfUgMMt1COt6AyFLAOjLnDtgzW6R3LLeU96gnDnn3ZOIBIMifEhZaDJVpaU02elM8K cqtp5MnpkLLDX09VM4sOuRptm3yPFDbQwBa5Ahjsmhk0Tf2CZTNN5xJ47FLJl9p3UX5n MKTNeB+Rfa2dVI1uVIO1wQjyZ1x/3VMf2mx2E+0weeLbC0PtkvjbWpNnyiQDMMYoHtF+ DvnlkzKeJYec9YH5FmR76vgep0+vutG2SGiNx0Oz1ucsbRunUFe0f7IMOM5P8/TaazGs h6DA== X-Gm-Message-State: APjAAAUoAomI8miw+W1ok6WL2B/+X0wIDI0hiRDVPSFV/wist+bnzdni REeA61tTgo+S8DXTbFMqv0LaPGhxVSpOAymM3fCPqA== X-Google-Smtp-Source: APXvYqxl4VCZzoyJVPT83VxBgkJYFT6M3egPfXKtL29sR1JchUU4I1dmy9nZ6EnuYL3PZlDTEk22yc7JjqgS7ZL9WWo= X-Received: by 2002:a67:fa95:: with SMTP id f21mr2245168vsq.180.1556809219724; Thu, 02 May 2019 08:00:19 -0700 (PDT) MIME-Version: 1.0 References: <20190502093334.7546-1-reshma.pattan@intel.com> In-Reply-To: <20190502093334.7546-1-reshma.pattan@intel.com> From: David Marchand Date: Thu, 2 May 2019 17:00:07 +0200 Message-ID: To: Reshma Pattan Cc: dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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: <20190502150007.QPXEwQqKn9eRvNK68UVpC1H-rCbxJGBaZ34X8cFjqIc@z> On Thu, May 2, 2019 at 11:33 AM Reshma Pattan wrote: > 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 =E2=80=98alloc_se= g_walk=E2=80=99: > ...lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: taking address > of packed member of =E2=80=98struct rte_mem_config=E2=80=99 may result in= an unaligned > pointer value [-Werror=3Daddress-of-packed-member] > 768 | cur_msl =3D &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 +=3D -Wimplicit-fallthrough=3D2 > WERROR_FLAGS +=3D -Wno-format-truncation > endif > > +# disable packed member unalign warnings > +WERROR_FLAGS +=3D -Wno-address-of-packed-member > + > export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF > export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS > -- > 2.21.0 > > Tested on rhel-7 and fedora-30. Tested-by: David Marchand --=20 David Marchand