aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-defaults.mk
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-04-12 21:21:49 +0000
committerJohn Crispin <john@openwrt.org>2014-04-12 21:21:49 +0000
commit76133009c90284c6c0eab59207f01980a3222213 (patch)
tree3225ab99d9d57b5de3be77190f5a9ade3949ee0b /include/kernel-defaults.mk
parent72803e0e27ec149784ff22ee528a7c11c6eefed1 (diff)
downloadupstream-76133009c90284c6c0eab59207f01980a3222213.tar.gz
upstream-76133009c90284c6c0eab59207f01980a3222213.tar.bz2
upstream-76133009c90284c6c0eab59207f01980a3222213.zip
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 <mathieu@qca.qualcomm.com> SVN-Revision: 40490
Diffstat (limited to 'include/kernel-defaults.mk')
-rw-r--r--include/kernel-defaults.mk4
1 files changed, 4 insertions, 0 deletions
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