X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=mk%2Ftoolchain%2Fgcc%2Frte.vars.mk;h=3b907e2019c6c5b26eaaa5d5f9eb8d4ec3bbd0ff;hb=ea978e7c2255ed34046ae1c0dfbb908529c67e12;hp=ff70f3d9f6ad3ec259a2dde65523a988f7aac9e1;hpb=b2bb3a5daaac395c775166fe246e0e48fde81822;p=dpdk.git diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index ff70f3d9f6..3b907e2019 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -32,10 +32,10 @@ # # toolchain: # -# - define CC, LD, AR, AS, ... (overriden by cmdline value) -# - define TOOLCHAIN_CFLAGS variable (overriden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overriden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overriden by cmdline value) +# - define CC, LD, AR, AS, ... (overridden by cmdline value) +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) # CC = $(CROSS)gcc @@ -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