From: Andrey Ryabinin Date: Thu, 16 Apr 2015 19:44:58 +0000 (-0700) Subject: kasan: Makefile: shut up warnings if CONFIG_COMPILE_TEST=y X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6e54abac1b8e0b7febffdbad37b605daef1cfcff;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 \ --param asan-instrumentation-with-call-threshold=$(call_threshold)) ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),) + ifneq ($(CONFIG_COMPILE_TEST),y) $(warning Cannot use CONFIG_KASAN: \ -fsanitize=kernel-address is not supported by compiler) + endif else ifeq ($(CFLAGS_KASAN),) - $(warning CONFIG_KASAN: compiler does not support all options.\ - Trying minimal configuration) + ifneq ($(CONFIG_COMPILE_TEST),y) + $(warning CONFIG_KASAN: compiler does not support all options.\ + Trying minimal configuration) + endif CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL) endif endif