EXTRA_LDFLAGS linker options
EXTRA_LDLIBS linker library options
RTE_KERNELDIR linux headers path
+ RTE_DEVEL_BUILD stricter options (default: y in git tree)
CROSS toolchain prefix
V verbose
D debug dependencies
By default, the variable is set to /lib/modules/$(shell uname -r)/build,
which is correct when the target machine is also the build machine.
+* RTE_DEVEL_BUILD: Stricter options (stop on warning). It defaults to y in a git tree.
+
Variables that Can be Set/Overridden in a Makefile Only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export RTE_EXEC_ENV
export RTE_TOOLCHAIN
+# developer build automatically enabled in a git tree
+ifneq ($(wildcard $(RTE_SDK)/.git),)
+RTE_DEVEL_BUILD := y
+endif
+
# SRCDIR is the current source directory
ifdef S
SRCDIR := $(abspath $(RTE_SRCDIR)/$(S))
TOOLCHAIN_CFLAGS =
TOOLCHAIN_LDFLAGS =
-WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
+WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith
WERROR_FLAGS += -Wnested-externs -Wcast-qual
WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
WERROR_FLAGS += -Wundef -Wwrite-strings
+ifeq ($(RTE_DEVEL_BUILD),y)
+WERROR_FLAGS += -Werror
+endif
+
# process cpu flags
include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
endif
endif
-WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
+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
+ifeq ($(RTE_DEVEL_BUILD),y)
+WERROR_FLAGS += -Werror
+endif
+
# There are many issues reported for ARMv7 architecture
# which are not necessarily fatal. Report as warnings.
ifeq ($(CONFIG_RTE_ARCH_ARMv7),y)
# error #13368: loop was not vectorized with "vector always assert"
# error #15527: loop was not vectorized: function call to fprintf cannot be vectorize
# was declared "deprecated"
-WERROR_FLAGS := -Wall -Werror-all -w2 -diag-disable 271 -diag-warning 1478
+WERROR_FLAGS := -Wall -w2 -diag-disable 271 -diag-warning 1478
WERROR_FLAGS += -diag-disable 13368 -diag-disable 15527
+ifeq ($(RTE_DEVEL_BUILD),y)
+WERROR_FLAGS += -Werror-all
+endif
+
# process cpu flags
include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
# disable max-inline params boundaries for ICC compiler for version 15 and greater