From 76133009c90284c6c0eab59207f01980a3222213 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 12 Apr 2014 21:21:49 +0000 Subject: sparse: add as a new package selectable from the config This change does multiple things, all related to enable sparse usage as a static analysis tool selectable from the OpenWrt configuration: *add a KERNEL_SPARSE option in the config to add sparse to the kernel build (through the C=1 option usage) *add sparse as a new host tools. It will get selected automatically when the above option will be enabled Signed-off-by: Mathieu Olivari SVN-Revision: 40490 --- include/kernel-defaults.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/kernel-defaults.mk') diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index caaa09d51d..322aeed5fa 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -24,6 +24,10 @@ ifneq (,$(KERNEL_CC)) KERNEL_MAKEOPTS += CC="$(KERNEL_CC)" endif +ifdef CONFIG_USE_SPARSE + KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse +endif + export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include # defined in quilt.mk -- cgit v1.2.3