blob: 370d970e5ab5bbaae1e21627245cad728a31742d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Andrey Ryabinin0b24bec2015-02-13 14:39:17 -08002KASAN_SANITIZE := n
Andrey Konovalov8a16c092020-05-13 17:50:51 -07003UBSAN_SANITIZE := n
Dmitry Vyukov5c9a8752016-03-22 14:27:30 -07004KCOV_INSTRUMENT := n
Andrey Ryabinin0b24bec2015-02-13 14:39:17 -08005
Andrey Konovalov8a16c092020-05-13 17:50:51 -07006# Disable ftrace to avoid recursion.
Torsten Duwee2092742019-02-08 16:10:14 +01007CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE)
8CFLAGS_REMOVE_generic.o = $(CC_FLAGS_FTRACE)
Linus Torvaldsc620f7b2019-05-06 17:54:22 -07009CFLAGS_REMOVE_generic_report.o = $(CC_FLAGS_FTRACE)
Andrey Konovalov8a16c092020-05-13 17:50:51 -070010CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
11CFLAGS_REMOVE_quarantine.o = $(CC_FLAGS_FTRACE)
12CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
Torsten Duwee2092742019-02-08 16:10:14 +010013CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE)
Andrey Konovalov8a16c092020-05-13 17:50:51 -070014CFLAGS_REMOVE_tags_report.o = $(CC_FLAGS_FTRACE)
Andrey Konovalovdc15a8a2019-02-20 22:20:20 -080015
Andrey Ryabinin0b24bec2015-02-13 14:39:17 -080016# Function splitter causes unnecessary splits in __asan_load1/__asan_store1
17# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533
Andrey Konovalovca734cc2020-06-01 21:52:43 -070018CC_FLAGS_KASAN_RUNTIME := $(call cc-option, -fno-conserve-stack)
Masahiro Yamada893ab0042020-06-27 03:59:12 +090019CC_FLAGS_KASAN_RUNTIME += -fno-stack-protector
Andrey Konovalovca734cc2020-06-01 21:52:43 -070020# Disable branch tracing to avoid recursion.
21CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
22
23CFLAGS_common.o := $(CC_FLAGS_KASAN_RUNTIME)
24CFLAGS_generic.o := $(CC_FLAGS_KASAN_RUNTIME)
25CFLAGS_generic_report.o := $(CC_FLAGS_KASAN_RUNTIME)
26CFLAGS_init.o := $(CC_FLAGS_KASAN_RUNTIME)
27CFLAGS_quarantine.o := $(CC_FLAGS_KASAN_RUNTIME)
28CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME)
29CFLAGS_tags.o := $(CC_FLAGS_KASAN_RUNTIME)
30CFLAGS_tags_report.o := $(CC_FLAGS_KASAN_RUNTIME)
Andrey Ryabinin0b24bec2015-02-13 14:39:17 -080031
Andrey Konovalov2bd926b2018-12-28 00:29:53 -080032obj-$(CONFIG_KASAN) := common.o init.o report.o
Andrey Konovalov11cd3cd2018-12-28 00:30:38 -080033obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
34obj-$(CONFIG_KASAN_SW_TAGS) += tags.o tags_report.o