X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=mk%2Ftoolchain%2Fgcc%2Frte.vars.mk;h=d8b99faf6c5782db353ced6a4b6ca8eac28ea3d5;hb=ebaa070de85e49ad01214b1940c7cdcdba2f4ef6;hp=7763ba79b6fae57d869e68cbb7ecc5d70564b6b4;hpb=2abaf2eba2a63535e5299ffedb0b5c9a7cdd6e50;p=dpdk.git diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 7763ba79b6..d8b99faf6c 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -47,7 +47,7 @@ WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual WERROR_FLAGS += -Wformat-nonliteral -Wformat-security -WERROR_FLAGS += -Wundef -Wwrite-strings +WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated ifeq ($(RTE_DEVEL_BUILD),y) WERROR_FLAGS += -Werror @@ -71,6 +71,15 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) WERROR_FLAGS += -Wno-uninitialized endif +HOST_WERROR_FLAGS := $(WERROR_FLAGS) + +ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1) +# Tell GCC only to error for switch fallthroughs without a suitable comment +HOST_WERROR_FLAGS += -Wimplicit-fallthrough=2 +# Ignore errors for snprintf truncation +HOST_WERROR_FLAGS += -Wno-format-truncation +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