If the ERR variable is set to any non-empty value other than "0", then -Werror
will be added to the compiler so that any build warning will trigger an error.
This is the recommended way to build when developing, and it is expected that
-contributed patches were tested with ERR=1.
+contributed patches were tested with ERR=1. Similarly, for developers, another
+variable, FAILFAST enables -Wfatal-errors when set to non-empty except 0, and
+makes the compiler stop at the first error instead of scrolling pages. It's
+essentially a matter of taste.
The DEBUG variable is used to extend the CFLAGS and is preset to a list of
build-time options that are known for providing significant reliability
# DEP may be cleared to ignore changes to include files during development
# DEBUG may be used to set some internal debugging options.
# ERR may be set to non-empty to pass -Werror to the compiler
+# FAILFAST may be set to non-empty to pass -Wfatal-errors to the compiler
# ADDINC may be used to complete the include path in the form -Ipath.
# ADDLIB may be used to complete the library list in the form -Lpath -llib.
# DEFINE may be used to specify any additional define, which will be reported
#### Compiler-specific flags to enable/disable certain classes of warnings.
WARN_CFLAGS := -Wtype-limits -Wshift-negative-value -Wshift-overflow=2 \
-Wduplicated-cond -Wnull-dereference
-SPEC_CFLAGS := -Wall -Wextra -Wundef -Wdeclaration-after-statement -Wfatal-errors
+SPEC_CFLAGS := -Wall -Wextra -Wundef -Wdeclaration-after-statement
SPEC_CFLAGS += $(call cc-all-fast,$(WARN_CFLAGS))
SPEC_CFLAGS += $(cc-wnouwo)
SPEC_CFLAGS += -Werror
endif
+ifneq ($(FAILFAST:0=),)
+ SPEC_CFLAGS += -Wfatal-errors
+endif
+
#### No longer used
SMALL_OPTS =
ifneq ($(SMALL_OPTS),)