Skip to contentSkip to conversation

mk: disable warning with gcc 9 on Fedora 30

PATCH Applied Reshma Pattan 7 participants 18 messages May 2, 2019 – May 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mk: disable warning with gcc 9 on Fedora 30

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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
---
 mk/toolchain/gcc/rte.vars.mk | 3 +++
 1 file changed, 3 insertions(+)
mk/toolchain/gcc/rte.vars.mk +3 -0
index d8b99faf6..b852fcfd7 100644
@@ -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
Signature · 1 line
2.21.0
#1 lore raw
Quoted 35 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
---
 mk/toolchain/gcc/rte.vars.mk | 3 +++
 1 file changed, 3 insertions(+)
mk/toolchain/gcc/rte.vars.mk +3 -1
index d8b99faf6..b852fcfd7 100644
@@ -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
--
Quoted 3 lines

2.21.0

Not the best approach to me...
Let me install a fedora 30 and have a look.

Signature · 1 line
David Marchand
#2 lore raw
Quoted 32 lines · David Marchand
Quoted 29 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
---
 mk/toolchain/gcc/rte.vars.mk | 3 +++
 1 file changed, 3 insertions(+)
mk/toolchain/gcc/rte.vars.mk +0 -0
index d8b99faf6..b852fcfd7 100644
@@ -87,5 +87,8 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
 WERROR_FLAGS += -Wno-format-truncation
 endif
 
Quoted 11 lines
Quoted 9 lines
mk/toolchain/gcc/rte.vars.mk +3 -1
+# 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

Not the best approach to me...

Agreed, but this fix does seem reasonable since we already disable this warning for clang.

Quoted 1 line

Let me install a fedora 30 and have a look.

Hopefully you can come up with a better fix, but I think we need something soon for 19.05, so this patch may be needed as a stop-gap fix.

/Bruce

#3 lore raw
Quoted 47 lines · Bruce Richardson
Quoted 7 lines · David Marchand
Quoted 4 lines · Reshma Pattan

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" warnings.

Quoted 6 lines
Quoted 6 lines

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’:

Quoted 1 line
Quoted 1 line

...lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: taking

address

Quoted 11 lines

mk/toolchain/gcc/

Quoted 11 lines

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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
---
 mk/toolchain/gcc/rte.vars.mk | 3 +++
 1 file changed, 3 insertions(+)
mk/toolchain/gcc/ renamed from mk/toolchain/gcc/rte.vars.mk +0 -0

rte.vars.mk

Quoted 7 lines
Quoted 7 lines

index d8b99faf6..b852fcfd7 100644

mk/toolchain/gcc/rte.vars.mk +0 -0
@@ -87,5 +87,8 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
 WERROR_FLAGS += -Wno-format-truncation
 endif
 
Quoted 11 lines
Quoted 9 lines
mk/toolchain/gcc/rte.vars.mk +3 -1
+# 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

Not the best approach to me...

Quoted 8 lines

Agreed, but this fix does seem reasonable since we already disable this warning
for clang.

Quoted 1 line

Let me install a fedora 30 and have a look.

Hopefully you can come up with a better fix, but I think we need something soon for 19.05, so this patch may be needed as a stop-gap fix.

Hiding this warning, we will never fix the places that could be fixed (and I found some where the packed attribute makes no sense to me). I'd prefer at least a -Wno-error=address-of-packed-member

Signature · 1 line
David Marchand
#4 lore raw

From: David Marchand [mailto:[email protected]]
Sent: Thursday, May 2, 2019 2:31 PM
To: Richardson, Bruce <[email protected]>
Cc: Pattan, Reshma <[email protected]>; dev <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30

On Thu, May 2, 2019 at 3:26 PM Bruce Richardson <[email protected]<mailto:[email protected]>> wrote:

Quoted 32 lines · David Marchand
Quoted 29 lines · On Thu, May 2, 2019 at 11:33 AM 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
---
 mk/toolchain/gcc/rte.vars.mk<http://rte.vars.mk> | 3 +++
 1 file changed, 3 insertions(+)
mk/toolchain/gcc/rte.vars.mk<http://rte.vars.mk> +0 -0
index d8b99faf6..b852fcfd7 100644
@@ -87,5 +87,8 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
 WERROR_FLAGS += -Wno-format-truncation
 endif
 
Quoted 11 lines
Quoted 9 lines
mk/toolchain/gcc/rte.vars.mk<http://rte.vars.mk> +3 -1
+# 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

Not the best approach to me...

Agreed, but this fix does seem reasonable since we already disable this warning for clang.

Quoted 1 line

Let me install a fedora 30 and have a look.

Hopefully you can come up with a better fix, but I think we need something soon for 19.05, so this patch may be needed as a stop-gap fix.

Hiding this warning, we will never fix the places that could be fixed (and I found some where the packed attribute makes no sense to me). I'd prefer at least a -Wno-error=address-of-packed-member

Hi,

If below is ok, I will send the patch.

mk/toolchain/gcc/rte.vars.mk +0 -0
index b852fcfd7..cfe6f2645 100644
@@ -49,6 +49,8 @@ WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual

WERROR_FLAGS += -Wformat-nonliteral -Wformat-security WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated

+WERROR_FLAGS += -Wno-error=address-of-packed-member +

Thanks,
Reshma

#5 lore raw

PATCH v2 1/1 mk: report address of packed member as warning

In reply to Reshma Pattan

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member.

Report it as warning instead of error to fix the build.

Snippet of build before fix ...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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~

Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address of packed member of ‘struct rte_mem_config’ may result in an unaligned pointer value [-Waddress-of-packed-member]
685 | msl = &mcfg->memsegs[msl_idx];

---
 mk/toolchain/gcc/rte.vars.mk | 4 ++++
 1 file changed, 4 insertions(+)
mk/toolchain/gcc/rte.vars.mk +4 -0
index d8b99faf6..61032bbbc 100644
@@ -87,5 +87,9 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
 WERROR_FLAGS += -Wno-format-truncation
 endif
 
+#Report "taking address of packed member may result
+#in an unaligned pointer value" issues as warnings.
+WERROR_FLAGS += -Wno-error=address-of-packed-member
+
 export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF
 export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS
Signature · 1 line
2.21.0
#6 lore raw

Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning

Quoted 41 lines · Reshma Pattan

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member.

Report it as warning instead of error to fix the build.

Snippet of build before fix ...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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~

Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address of packed member of ‘struct rte_mem_config’ may result in an unaligned pointer value [-Waddress-of-packed-member]
685 | msl = &mcfg->memsegs[msl_idx];

---
 mk/toolchain/gcc/rte.vars.mk | 4 ++++
 1 file changed, 4 insertions(+)
mk/toolchain/gcc/rte.vars.mk +4 -1
index d8b99faf6..61032bbbc 100644
@@ -87,5 +87,9 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
 WERROR_FLAGS += -Wno-format-truncation
 endif
 
+#Report "taking address of packed member may result
+#in an unaligned pointer value" issues as warnings.
+WERROR_FLAGS += -Wno-error=address-of-packed-member
+
 export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF
 export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS
--
Quoted 3 lines

2.21.0

No, you can't do this unconditionally.

Looked at clang (in make build system) and meson (globally) and those completely disable the warning.

$ git grep address-of-packed-member origin/master --
origin/master:config/meson.build:       '-Wno-address-of-packed-member'
origin/master:mk/toolchain/clang/rte.vars.mk:WERROR_FLAGS +=
-Wno-address-of-packed-member

It should be something like (untested):

@@ -87,5 +87,10 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
WERROR_FLAGS += -Wno-format-truncation
endif

+# disable packed member unalign warnings
+ifeq ($(shell test $(GCC_VERSION) -ge 90 && echo 1), 1) +WERROR_FLAGS += -Wno-address-of-packed-member +endif
+
export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS

Signature · 1 line
David Marchand
#7 lore raw

Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning

Quoted 59 lines · David Marchand

On Thu, May 2, 2019 at 4:13 PM Reshma Pattan
<[1][email protected]> wrote:

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member. Report it as warning instead of error to fix the build. Snippet of build before fix ...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];
| ^~~~~~~~~~~~~~~~~~~~~~~
Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address
of packed member of ‘struct rte_mem_config’ may result in an unaligned
pointer value [-Waddress-of-packed-member]
685 | msl = &mcfg->memsegs[msl_idx];

---
mk/toolchain/gcc/[3]rte.vars.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mk/toolchain/gcc/[4]rte.vars.mk b/mk/toolchain/gcc/[5]rte.vars.mk
index d8b99faf6..61032bbbc 100644
--- a/mk/toolchain/gcc/[6]rte.vars.mk
+++ b/mk/toolchain/gcc/[7]rte.vars.mk
@@ -87,5 +87,9 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
WERROR_FLAGS += -Wno-format-truncation
endif
+#Report "taking address of packed member may result +#in an unaligned pointer value" issues as warnings. +WERROR_FLAGS += -Wno-error=address-of-packed-member +
export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS
--
2.21.0

No, you can't do this unconditionally.
Looked at clang (in make build system) and meson (globally) and those completely disable the warning.

   $ git grep address-of-packed-member origin/master --
   origin/master:config/meson.build:       '-Wno-address-of-packed-member'
   origin/master:mk/toolchain/clang/rte.vars.mk:WERROR_FLAGS +=
   -Wno-address-of-packed-member
   It should be something like (untested):
   @@ -87,5 +87,10 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
    WERROR_FLAGS += -Wno-format-truncation
    endif
Quoted 5 lines
   +# disable packed member unalign warnings
   +ifeq ($(shell test $(GCC_VERSION) -ge 90 && echo 1), 1)
   +WERROR_FLAGS += -Wno-address-of-packed-member
   +endif
   +

Actually, you should not need to check the GCC version for this. GCC always ignores silently any warning disable flags it doesn't recognise, only printing information about them if there is another error to report. [This is why meson, when you ask it if the compiler supports "-Wno-foo", will check the flag and also the -Wfoo flag, as gcc won't report an error with just the "no" form]

/Bruce

#8 lore raw

Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning

Quoted 66 lines · Bruce Richardson
Quoted 47 lines · David Marchand

On Thu, May 2, 2019 at 4:13 PM Reshma Pattan
<[1][email protected]> wrote:

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member. Report it as warning instead of error to fix the build. Snippet of build before fix ...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];
| ^~~~~~~~~~~~~~~~~~~~~~~
Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address
of packed member of ‘struct rte_mem_config’ may result in an unaligned
pointer value [-Waddress-of-packed-member]
685 | msl = &mcfg->memsegs[msl_idx];

---
mk/toolchain/gcc/[3]rte.vars.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mk/toolchain/gcc/[4]rte.vars.mk b/mk/toolchain/gcc/[5]rte.vars.mk
index d8b99faf6..61032bbbc 100644
--- a/mk/toolchain/gcc/[6]rte.vars.mk
+++ b/mk/toolchain/gcc/[7]rte.vars.mk
@@ -87,5 +87,9 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
WERROR_FLAGS += -Wno-format-truncation
endif
+#Report "taking address of packed member may result +#in an unaligned pointer value" issues as warnings. +WERROR_FLAGS += -Wno-error=address-of-packed-member +
export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS
--
2.21.0

Quoted 5 lines

No, you can't do this unconditionally.
Looked at clang (in make build system) and meson (globally) and those completely disable the warning.

   $ git grep address-of-packed-member origin/master --
   origin/master:config/meson.build:

'-Wno-address-of-packed-member'

Quoted 4 lines
   origin/master:mk/toolchain/clang/rte.vars.mk:WERROR_FLAGS +=
   -Wno-address-of-packed-member
   It should be something like (untested):
   @@ -87,5 +87,10 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2
Quoted 8 lines
    WERROR_FLAGS += -Wno-format-truncation
    endif

   +# disable packed member unalign warnings
   +ifeq ($(shell test $(GCC_VERSION) -ge 90 && echo 1), 1)
   +WERROR_FLAGS += -Wno-address-of-packed-member
   +endif
   +
Quoted 8 lines

Actually, you should not need to check the GCC version for this. GCC always ignores silently any warning disable flags it doesn't recognise, only printing information about them if there is another error to report. [This is why meson, when you ask it if the compiler supports "-Wno-foo", will
check the flag and also the -Wfoo flag, as gcc won't report an error with just the "no" form]

WERROR_FLAGS += -Wno-error=address-of-packed-member triggers an error.

[dmarchan@dmarchan dpdk]$ make EXTRA_CFLAGS="-g -O0" O=master
cc1: error: -Werror=address-of-packed-member: no option -Waddress-of-packed-member
== Build lib
cc1: error: -Werror=address-of-packed-member: no option -Waddress-of-packed-member
== Build lib/librte_kvargs
cc1: error: -Werror=address-of-packed-member: no option -Waddress-of-packed-member
CC rte_kvargs.o
cc1: error: -Werror=address-of-packed-member: no option -Waddress-of-packed-member
make[3]: *** [rte_kvargs.o] Error 1
make[2]: *** [librte_kvargs] Error 2
make[1]: *** [lib] Error 2
make: *** [all] Error 2

WERROR_FLAGS += -Wno-address-of-packed-member is ignored.

Marvellous :-)
Sorry for the noise, let's go with your initial patch.

Signature · 1 line
David Marchand
#9 lore raw

Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning

In reply to Reshma Pattan
Quoted 14 lines · Reshma Pattan

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member.

Report it as warning instead of error to fix the build.

Snippet of build before fix ...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];
       |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines

Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address of packed member of ‘struct rte_mem_config’ may result in an unaligned pointer value [-Waddress-of-packed-member]
685 | msl = &mcfg->memsegs[msl_idx];

Fixing these would require an ABI break, because these are exposed externally. Should we submit a deprecation notice for EAL?

Signature · 2 lines
Thanks,
Anatoly
#10 lore raw

Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning

Quoted 23 lines · Anatoly
Quoted 14 lines · Reshma Pattan

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member.

Report it as warning instead of error to fix the build.

Snippet of build before fix ...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];
       |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines

Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address of packed member of ‘struct rte_mem_config’ may result in an unaligned pointer value [-Waddress-of-packed-member]
685 | msl = &mcfg->memsegs[msl_idx];

Quoted 2 lines

Fixing these would require an ABI break, because these are exposed externally. Should we submit a deprecation notice for EAL?

Ideally mem config and related structures would not be exposed in the API. Like lcore_config and eal_config it should be eal_private

#11 lore raw

Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning

Quoted 26 lines · Stephen Hemminger
Quoted 23 lines · Anatoly
Quoted 21 lines · Reshma Pattan

gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an unaligned pointer value" for -Waddress-of-packed-member.

Report it as warning instead of error to fix the build.

Snippet of build before fix ...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];
        |            ^~~~~~~~~~~~~~~~~~~~~~~

Snippet of build after fix ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’:
..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address of packed member of ‘struct rte_mem_config’ may result in an unaligned pointer value [-Waddress-of-packed-member]

    685 |   msl = &mcfg->memsegs[msl_idx];
Quoted 7 lines
Quoted 2 lines

Fixing these would require an ABI break, because these are exposed externally. Should we submit a deprecation notice for EAL?

Ideally mem config and related structures would not be exposed in the API. Like lcore_config and eal_config it should be eal_private

In a perfect world, that would've been the case. However, these are in shared memory structures that are used for multiprocess synchronization.

Signature · 2 lines
Thanks,
Anatoly
Tested-by on v1 1/1
#12 lore raw
In reply to Reshma Pattan
Quoted 35 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
---
 mk/toolchain/gcc/rte.vars.mk | 3 +++
 1 file changed, 3 insertions(+)
mk/toolchain/gcc/rte.vars.mk +3 -1
index d8b99faf6..b852fcfd7 100644
@@ -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
--
Quoted 3 lines

2.21.0

Tested on rhel-7 and fedora-30.

Signature · 1 line
David Marchand
#13 lore raw

02/05/2019 17:00, David Marchand:

Quoted 19 lines
Quoted 16 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 5 lines
Quoted 3 lines

Tested on rhel-7 and fedora-30.

Applied, thanks

#14 lore raw
Quoted 27 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Thursday, May 2, 2019 9:27 PM
To: Reshma Pattan <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30

02/05/2019 17:00, David Marchand:

Quoted 19 lines
Quoted 15 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Tested on rhel-7 and fedora-30.

Applied, thanks

Its been found that one of the armv7 toolchain treats -Wno-address-of-packed-member as unrecognized command line option,
Hence armv7 build fails on dpdk.org master now. Not sure it is specific to armv7 or compiler?

Armv7 is not maintained and I don’t think, it has any use case for DPDK. If everyone agrees IMO it is better remove the arm 32bit support.

    arm-buildroot-linux-gnueabihf-gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    bin/arm-buildroot-linux-gnueabihf-gcc.br_real
    COLLECT_LTO_WRAPPER=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    libexec/gcc/arm-buildroot-linux-gnueabihf/7.3.0/lto-wrapper
    Target: arm-buildroot-linux-gnueabihf
    Configured with: ./configure
    --prefix=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --sysconfdir=/opt/armv7-eabihf--glibc--stable-2018.11-1/etc
    --enable-static --target=arm-buildroot-linux-gnueabihf
    --with-sysroot=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/sysroot
    --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
    --with-gmp=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpc=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpfr=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-pkgversion='Buildroot 2018.08.1-00003-g576b333'
    --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath
    --enable-tls --disable-libmudflap --enable-threads --without-isl
    --without-cloog --disable-decimal-float --with-abi=aa
    pcs-linux --with-cpu=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard
    --with-mode=arm --enable-languages=c,c++
    --with-build-time-tools=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
    Thread model: posix
    gcc version 7.3.0 (Buildroot 2018.08.1-00003-g576b333)

    error log:

    dpdk.org/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c: At top level:
    cc1: error: unrecognized command line option
    ‘-Wno-address-of-packed-member’ [-Werror]
    cc1: all warnings being treated as errors
Quoted 2 lines
#15 lore raw
Quoted 68 lines · Jerin Jacob Kollanukkaran
Quoted 27 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Thursday, May 2, 2019 9:27 PM
To: Reshma Pattan <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30

02/05/2019 17:00, David Marchand:

Quoted 19 lines
Quoted 15 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Tested on rhel-7 and fedora-30.

Applied, thanks

Its been found that one of the armv7 toolchain treats -Wno-address-of-packed-member as unrecognized command line option,
Hence armv7 build fails on dpdk.org master now. Not sure it is specific to armv7 or compiler?

Armv7 is not maintained and I don’t think, it has any use case for DPDK. If everyone agrees IMO it is better remove the arm 32bit support.

    arm-buildroot-linux-gnueabihf-gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    bin/arm-buildroot-linux-gnueabihf-gcc.br_real
    COLLECT_LTO_WRAPPER=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    libexec/gcc/arm-buildroot-linux-gnueabihf/7.3.0/lto-wrapper
    Target: arm-buildroot-linux-gnueabihf
    Configured with: ./configure
    --prefix=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --sysconfdir=/opt/armv7-eabihf--glibc--stable-2018.11-1/etc
    --enable-static --target=arm-buildroot-linux-gnueabihf
    --with-sysroot=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/sysroot
    --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
    --with-gmp=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpc=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpfr=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-pkgversion='Buildroot 2018.08.1-00003-g576b333'
    --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath
    --enable-tls --disable-libmudflap --enable-threads --without-isl
    --without-cloog --disable-decimal-float --with-abi=aa
    pcs-linux --with-cpu=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard
    --with-mode=arm --enable-languages=c,c++
    --with-build-time-tools=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
    Thread model: posix
Quoted 9 lines
    gcc version 7.3.0 (Buildroot 2018.08.1-00003-g576b333)

    error log:

    dpdk.org/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c: At top level:
    cc1: error: unrecognized command line option
    ‘-Wno-address-of-packed-member’ [-Werror]
    cc1: all warnings being treated as errors

Are you sure there is not another error as well? GCC silently ignores flags like this one normally, but does report them as unrecognised if-and-only-if another error or warning is given too.

/Bruce

#16 lore raw
Quoted 90 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, May 3, 2019 5:25 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30

Quoted 13 lines · Jerin Jacob Kollanukkaran
Quoted 13 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Thursday, May 2, 2019 9:27 PM
To: Reshma Pattan <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30

02/05/2019 17:00, David Marchand:

Quoted 4 lines

On Thu, May 2, 2019 at 11:33 AM Reshma Pattan
<[email protected]>
wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

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’:

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

...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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Tested on rhel-7 and fedora-30.

Applied, thanks

Its been found that one of the armv7 toolchain treats -Wno-address-of-packed-member as unrecognized command line option, Hence armv7 build fails on dpdk.org master now. Not sure it is specific

to armv7 or compiler?

Quoted 4 lines

Armv7 is not maintained and I don’t think, it has any use case for DPDK. If everyone agrees IMO it is better remove the arm 32bit support.

Quoted 14 lines
    arm-buildroot-linux-gnueabihf-gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    bin/arm-buildroot-linux-gnueabihf-gcc.br_real
    COLLECT_LTO_WRAPPER=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    libexec/gcc/arm-buildroot-linux-gnueabihf/7.3.0/lto-wrapper
    Target: arm-buildroot-linux-gnueabihf
    Configured with: ./configure
    --prefix=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --sysconfdir=/opt/armv7-eabihf--glibc--stable-2018.11-1/etc
    --enable-static --target=arm-buildroot-linux-gnueabihf
    --with-sysroot=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/sysroot
    --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-

multilib

Quoted 8 lines
    --with-gmp=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpc=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpfr=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-pkgversion='Buildroot 2018.08.1-00003-g576b333'
    --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath
    --enable-tls --disable-libmudflap --enable-threads --without-isl
    --without-cloog --disable-decimal-float --with-abi=aa
    pcs-linux --with-cpu=cortex-a9 --with-fpu=vfpv3-d16 --with-

float=hard

Quoted 6 lines

--with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/opt/armv7-eabihf--glibc--stable-2018.11-1/ arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp Thread model: posix
gcc version 7.3.0 (Buildroot 2018.08.1-00003-g576b333)

Quoted 7 lines

error log:

dpdk.org/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’ [-Werror]
cc1: all warnings being treated as errors

Quoted 5 lines

Are you sure there is not another error as well? GCC silently ignores flags like this one normally, but does report them as unrecognised if-and- only-if another error or warning is given too.

/Bruce

For completeness, ref: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

"When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that the option is not recognized. However, if the -Wno- form is used, the behavior is slightly different: no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced. This allows the use of new -Wno- options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present."

#17 lore raw
In reply to Bruce Richardson
Quoted 89 lines

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Friday, May 3, 2019 9:55 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Thomas Monjalon <[email protected]>; Reshma Pattan <[email protected]>; [email protected]; David Marchand <[email protected]>; [email protected]; Gavin Hu (Arm Technology China) <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora

Quoted 30 lines · Jerin Jacob Kollanukkaran
Quoted 30 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Thursday, May 2, 2019 9:27 PM
To: Reshma Pattan <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30

02/05/2019 17:00, David Marchand:

Quoted 21 lines
Quoted 17 lines · 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];
      |            ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Tested on rhel-7 and fedora-30.

Applied, thanks

Its been found that one of the armv7 toolchain treats -Wno-address-of-packed-member as unrecognized command line option, Hence armv7 build fails on dpdk.org master now. Not sure it is specific to

armv7 or compiler?

Quoted 30 lines

Armv7 is not maintained and I don’t think, it has any use case for DPDK. If everyone agrees IMO it is better remove the arm 32bit support.

    arm-buildroot-linux-gnueabihf-gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    bin/arm-buildroot-linux-gnueabihf-gcc.br_real
    COLLECT_LTO_WRAPPER=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    libexec/gcc/arm-buildroot-linux-gnueabihf/7.3.0/lto-wrapper
    Target: arm-buildroot-linux-gnueabihf
    Configured with: ./configure
    --prefix=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --sysconfdir=/opt/armv7-eabihf--glibc--stable-2018.11-1/etc
    --enable-static --target=arm-buildroot-linux-gnueabihf
    --with-sysroot=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/sysroot
    --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
    --with-gmp=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpc=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-mpfr=/opt/armv7-eabihf--glibc--stable-2018.11-1
    --with-pkgversion='Buildroot 2018.08.1-00003-g576b333'
    --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath
    --enable-tls --disable-libmudflap --enable-threads --without-isl
    --without-cloog --disable-decimal-float --with-abi=aa
    pcs-linux --with-cpu=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard
    --with-mode=arm --enable-languages=c,c++
    --with-build-time-tools=/opt/armv7-eabihf--glibc--stable-2018.11-1/
    arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
    Thread model: posix
Quoted 9 lines
    gcc version 7.3.0 (Buildroot 2018.08.1-00003-g576b333)

    error log:

    dpdk.org/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c: At top level:
    cc1: error: unrecognized command line option
    ‘-Wno-address-of-packed-member’ [-Werror]
    cc1: all warnings being treated as errors
Quoted 3 lines

Are you sure there is not another error as well? GCC silently ignores flags like this one normally, but does report them as unrecognised if-and-only-if another error or warning is given too.

That’s explains reason for error for armv7(the file has other warnings).
There are plenty of warning for armv7 port. That is the one reason why, I think, we need to remove Armv7 port if there is no end user for it. It just a pain to maintain it.

arm-buildroot-linux-gnueabihf-gcc -Wp,-MD,./.eal_vfio.o.d.tmp -marm -munaligned-access -pthread -I/home/jerin/dpdk.org/lib/librte_eal/linux/eal/include -march=armv7-a -mtune=cortex-a9 -mfpu =neon -DRTE_MACHINE_CPUFLAG_NEON -I/home/jerin/dpdk.org/build/include -include /home/jerin/dpdk.org/build/include/rte_config.h -D_GNU_SOURCE -DALLOW_EXPERIMENTAL_API -I/home/jerin/dpdk.org/l ib/librte_eal/linux/eal/include -I/home/jerin/dpdk.org/lib/librte_eal/common -I/home/jerin/dpdk.org/lib/librte_eal/common/include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-d eclarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Werror -Wno-error=cast
-align -Wimplicit-fallthrough=2 -Wno-format-truncation -Wno-address-of-packed-member -O3 -o eal_vfio.o -c /home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c: In function ‘vfio_open_group_fd’:
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:268:28: warning: cast increases required alignment of target type [-Wcast-align]

  struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
                            ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:315:7: warning: cast increases required alignment of target type [-Wcast-align]
   p = (struct vfio_mp_param *)mp_rep->param;
       ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c: In function ‘vfio_sync_default_container’:
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:558:28: warning: cast increases required alignment of target type [-Wcast-align]
  struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
                            ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:583:7: warning: cast increases required alignment of target type [-Wcast-align]
   p = (struct vfio_mp_param *)mp_rep->param;
       ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c: In function ‘vfio_get_default_container_fd’:
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:1027:28: warning: cast increases required alignment of target type [-Wcast-align]
  struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
                            ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:1048:7: warning: cast increases required alignment of target type [-Wcast-align]
   p = (struct vfio_mp_param *)mp_rep->param;
       ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c: In function ‘rte_vfio_get_container_fd’:
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:1133:28: warning: cast increases required alignment of target type [-Wcast-align]
  struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
                            ^
/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c:1179:7: warning: cast increases required alignment of target type [-Wcast-align]
   p = (struct vfio_mp_param *)mp_rep->param;
       ^

/home/jerin/dpdk.org/lib/librte_eal/linux/eal/eal_vfio.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’ [-Werror]
cc1: all warnings being treated as errors
make[5]: *** [/home/jerin/dpdk.org/mk/internal/rte.compile-pre.mk:116: eal_vfio.o] Error 1 make[4]: *** [/home/jerin/dpdk.org/mk/rte.subdir.mk:37: eal] Error 2 make[3]: *** [/home/jerin/dpdk.org/mk/rte.subdir.mk:37: linux] Error 2 make[2]: *** [/home/jerin/dpdk.org/mk/rte.subdir.mk:37: librte_eal] Error 2 make[1]: *** [/home/jerin/dpdk.org/mk/rte.sdkbuild.mk:48: lib] Error 2
make: *** [/home/jerin/dpdk.org/mk/rte.sdkroot.mk:99: all] Error 2

Quoted 2 lines

/Bruce