X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=mk%2Ftoolchain%2Fgcc%2Frte.vars.mk;fp=mk%2Ftoolchain%2Fgcc%2Frte.vars.mk;h=3834e00cff2666939cdde618b5bb11c817159905;hb=7595afa4d30097c1177b69257118d8ad89a539be;hp=ff70f3d9f6ad3ec259a2dde65523a988f7aac9e1;hpb=ce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6;p=deb_dpdk.git diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index ff70f3d9..3834e00c 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -81,9 +81,9 @@ ifeq ($(RTE_DEVEL_BUILD),y) WERROR_FLAGS += -Werror endif -# There are many issues reported for ARMv7 architecture +# There are many issues reported for strict alignment architectures # which are not necessarily fatal. Report as warnings. -ifeq ($(CONFIG_RTE_ARCH_ARMv7),y) +ifeq ($(CONFIG_RTE_ARCH_STRICT_ALIGN),y) WERROR_FLAGS += -Wno-error=cast-align endif @@ -99,5 +99,12 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) WERROR_FLAGS += -Wno-uninitialized endif +ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1) +# Tell GCC only to error for switch fallthroughs without a suitable comment +WERROR_FLAGS += -Wimplicit-fallthrough=2 +# Ignore errors for snprintf truncation +WERROR_FLAGS += -Wno-format-truncation +endif + export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS