DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30
@ 2019-05-02  9:33 Reshma Pattan
  2019-05-02  9:33 ` Reshma Pattan
                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Reshma Pattan @ 2019-05-02  9:33 UTC (permalink / raw)
  To: dev; +Cc: Reshma Pattan

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 <reshma.pattan@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2019-05-03 17:24 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02  9:33 [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30 Reshma Pattan
2019-05-02  9:33 ` Reshma Pattan
2019-05-02 10:07 ` David Marchand
2019-05-02 10:07   ` David Marchand
2019-05-02 13:26   ` Bruce Richardson
2019-05-02 13:26     ` Bruce Richardson
2019-05-02 13:30     ` David Marchand
2019-05-02 13:30       ` David Marchand
2019-05-02 13:35       ` Pattan, Reshma
2019-05-02 13:35         ` Pattan, Reshma
2019-05-02 14:13 ` [dpdk-dev] [PATCH v2] mk: report address of packed member as warning Reshma Pattan
2019-05-02 14:13   ` Reshma Pattan
2019-05-02 14:24   ` David Marchand
2019-05-02 14:24     ` David Marchand
2019-05-02 14:41     ` Bruce Richardson
2019-05-02 14:41       ` Bruce Richardson
2019-05-02 14:48       ` David Marchand
2019-05-02 14:48         ` David Marchand
2019-05-02 15:53   ` Burakov, Anatoly
2019-05-02 15:53     ` Burakov, Anatoly
2019-05-02 18:54     ` Stephen Hemminger
2019-05-02 18:54       ` Stephen Hemminger
2019-05-03  7:56       ` Burakov, Anatoly
2019-05-03  7:56         ` Burakov, Anatoly
2019-05-02 15:00 ` [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30 David Marchand
2019-05-02 15:00   ` David Marchand
2019-05-02 15:56   ` Thomas Monjalon
2019-05-02 15:56     ` Thomas Monjalon
2019-05-03 16:01     ` Jerin Jacob Kollanukkaran
2019-05-03 16:01       ` Jerin Jacob Kollanukkaran
2019-05-03 16:25       ` Bruce Richardson
2019-05-03 16:25         ` Bruce Richardson
2019-05-03 16:28         ` Richardson, Bruce
2019-05-03 16:28           ` Richardson, Bruce
2019-05-03 17:24         ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2019-05-03 17:24           ` Jerin Jacob Kollanukkaran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).