This patch adds a WERROR variable to Makefile that can be used as follows:
make WERROR=0
to disable '-Werror' while building. This is useful while doing 'git bisect',
for example.
Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
+#
+# Define WERROR=0 to disable -Werror.
+#
+
ifeq ($(strip $(V)),)
E = @echo
Q = @
KVM_INCLUDE := include
CFLAGS += $(CPPFLAGS) $(DEFINES) -I$(KVM_INCLUDE) -I../../include -I../../arch/$(ARCH)/include/ -Os -g
-WARNINGS += -Werror
+ifneq ($(WERROR),0)
+ WARNINGS += -Werror
+endif
+
WARNINGS += -Wall
WARNINGS += -Wcast-align
WARNINGS += -Wformat=2