mk: disable warning for packed member pointer
authorReshma Pattan <reshma.pattan@intel.com>
Thu, 2 May 2019 09:33:34 +0000 (10:33 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 2 May 2019 21:04:38 +0000 (23:04 +0200)
commita385972c3675dd2b4792ab5b3cf7a536e6f9846c
treee9082ea086de547c80ea9b81342d480be5c2ff00
parent86cc8ff243f55d60c9f60b122289a29e010e87a0
mk: disable warning for packed member pointer

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>
Tested-by: David Marchand <david.marchand@redhat.com>
mk/toolchain/gcc/rte.vars.mk