kvm tools: Add WERROR to Makefile for disabling -Werror

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>
This commit is contained in:
Pekka Enberg
2015-06-01 16:39:45 +01:00
committed by Will Deacon
parent 4265558798
commit b458f162f6
+8 -1
View File
@@ -1,3 +1,7 @@
#
# Define WERROR=0 to disable -Werror.
#
ifeq ($(strip $(V)),)
E = @echo
Q = @
@@ -111,7 +115,10 @@ DEFINES += -D_GNU_SOURCE
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