aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Ryabinin <a.ryabinin@samsung.com>2015-04-16 15:44:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 09:03:59 -0400
commit6e54abac1b8e0b7febffdbad37b605daef1cfcff (patch)
tree6b8cd8b481b3584d80167f0357f8ca5a19950f0a
parent6ceafb880c218a14e0cf8d08499138a1a9775fb2 (diff)
kasan: Makefile: shut up warnings if CONFIG_COMPILE_TEST=y
It might be annoying to constantly see this: scripts/Makefile.kasan:16: Cannot use CONFIG_KASAN: -fsanitize=kernel-address is not supported by compiler while performing allmodconfig/allyesconfig build tests. Disable this warning if CONFIG_COMPILE_TEST=y. Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--scripts/Makefile.kasan8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 631619b2b118..3f874d24234f 100644
--- a/scripts/Makefile.kasan
+++ b/scripts/Makefile.kasan
@@ -13,12 +13,16 @@ CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \
13 --param asan-instrumentation-with-call-threshold=$(call_threshold)) 13 --param asan-instrumentation-with-call-threshold=$(call_threshold))
14 14
15ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),) 15ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),)
16 ifneq ($(CONFIG_COMPILE_TEST),y)
16 $(warning Cannot use CONFIG_KASAN: \ 17 $(warning Cannot use CONFIG_KASAN: \
17 -fsanitize=kernel-address is not supported by compiler) 18 -fsanitize=kernel-address is not supported by compiler)
19 endif
18else 20else
19 ifeq ($(CFLAGS_KASAN),) 21 ifeq ($(CFLAGS_KASAN),)
20 $(warning CONFIG_KASAN: compiler does not support all options.\ 22 ifneq ($(CONFIG_COMPILE_TEST),y)
21 Trying minimal configuration) 23 $(warning CONFIG_KASAN: compiler does not support all options.\
24 Trying minimal configuration)
25 endif
22 CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL) 26 CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
23 endif 27 endif
24endif 28endif