From 44e60daf75d8a62501f853c485d923a328d8b30d Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 8 Jun 2011 17:29:12 +0300 Subject: [PATCH] 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 Cc: Cyrill Gorcunov Signed-off-by: Pekka Enberg --- tools/kvm/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index 84aea8ca3141..97dce8698e2f 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -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 -- 2.39.5