Commit-ID: 3a7d5bc0e3e5cbf2451e026c9a4f1874ab5bbafa Gitweb: http://git.kernel.org/tip/3a7d5bc0e3e5cbf2451e026c9a4f1874ab5bbafa Author: Sasha Levin <levinsasha928@xxxxxxxxx> AuthorDate: Mon, 17 Sep 2012 23:40:23 +0200 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Tue, 18 Sep 2012 10:58:32 +0300 kvm tools: support build-time checks Support using build-time check tools when building lkvm. This allows using tools such as smatch with the same syntax used with kernel code. For example, to build with smatch checks, first make sure you have smatch installed, then run: make CHECK="smatch -p=kernel" C=1 Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/Makefile | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index d4b5eb3..e0d07dc 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -322,18 +322,34 @@ $(OBJS): # This rule relaxes the -Werror on libfdt, since for now it still has # a bunch of warnings. :( ../../scripts/dtc/libfdt/%.o: ../../scripts/dtc/libfdt/%.c +ifeq ($(C),1) + $(E) " CHECK " $@ + $(Q) $(CHECK) -c $(CFLAGS_EASYGOING) $< -o $@ +endif $(E) " CC " $@ $(Q) $(CC) -c $(CFLAGS_EASYGOING) $< -o $@ util/rbtree.static.o util/rbtree.o: ../../lib/rbtree.c +ifeq ($(C),1) + $(E) " CHECK " $@ + $(Q) $(CHECK) -c $(CFLAGS) $< -o $@ +endif $(E) " CC " $@ $(Q) $(CC) -c $(CFLAGS) $< -o $@ %.static.o: %.c +ifeq ($(C),1) + $(E) " CHECK " $@ + $(Q) $(CHECK) -c $(CFLAGS) $(CFLAGS_STATOPT) $< -o $@ +endif $(E) " CC " $@ $(Q) $(CC) -c $(CFLAGS) $(CFLAGS_STATOPT) $< -o $@ %.o: %.c +ifeq ($(C),1) + $(E) " CHECK " $@ + $(Q) $(CHECK) -c $(CFLAGS) $(CFLAGS_DYNOPT) $< -o $@ +endif $(E) " CC " $@ $(Q) $(CC) -c $(CFLAGS) $(CFLAGS_DYNOPT) $< -o $@ -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html