[dpdk-dev] [PATCH] mk: disable flag for no packet member warning
kkanas at marvell.com
kkanas at marvell.com
Mon Jul 22 14:39:59 CEST 2019
From: Krzysztof Kanas <kkanas at marvell.com>
gcc prior 9 don't will add additional warning for unrecognized command
line option, but only when there is some other warning in the code, e.g
unused variable.
Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
Cc: reshma.pattan at intel.com
Signed-off-by: Krzysztof Kanas <kkanas at marvell.com>
---
mk/toolchain/gcc/rte.vars.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index b852fcfd7e24..1bd384f7ca3f 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -88,7 +88,9 @@ WERROR_FLAGS += -Wno-format-truncation
endif
# disable packed member unalign warnings
+ifeq ($(shell test $(HOST_GCC_VERSION) -gt 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
--
2.21.0
More information about the dev
mailing list