1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 20b24beccSAndrey RyabininKASAN_SANITIZE := n 38a16c09eSAndrey KonovalovUBSAN_SANITIZE := n 45c9a8750SDmitry VyukovKCOV_INSTRUMENT := n 50b24beccSAndrey Ryabinin 68a16c09eSAndrey Konovalov# Disable ftrace to avoid recursion. 7e2092740STorsten DuweCFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) 8e2092740STorsten DuweCFLAGS_REMOVE_generic.o = $(CC_FLAGS_FTRACE) 9c620f7bdSLinus TorvaldsCFLAGS_REMOVE_generic_report.o = $(CC_FLAGS_FTRACE) 108a16c09eSAndrey KonovalovCFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE) 118a16c09eSAndrey KonovalovCFLAGS_REMOVE_quarantine.o = $(CC_FLAGS_FTRACE) 128a16c09eSAndrey KonovalovCFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE) 13*bb359dbcSAndrey KonovalovCFLAGS_REMOVE_shadow.o = $(CC_FLAGS_FTRACE) 14e2092740STorsten DuweCFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE) 158a16c09eSAndrey KonovalovCFLAGS_REMOVE_tags_report.o = $(CC_FLAGS_FTRACE) 16dc15a8a2SAndrey Konovalov 170b24beccSAndrey Ryabinin# Function splitter causes unnecessary splits in __asan_load1/__asan_store1 180b24beccSAndrey Ryabinin# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533 19ca734cc6SAndrey KonovalovCC_FLAGS_KASAN_RUNTIME := $(call cc-option, -fno-conserve-stack) 20893ab004SMasahiro YamadaCC_FLAGS_KASAN_RUNTIME += -fno-stack-protector 21ca734cc6SAndrey Konovalov# Disable branch tracing to avoid recursion. 22ca734cc6SAndrey KonovalovCC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING 23ca734cc6SAndrey Konovalov 24ca734cc6SAndrey KonovalovCFLAGS_common.o := $(CC_FLAGS_KASAN_RUNTIME) 25ca734cc6SAndrey KonovalovCFLAGS_generic.o := $(CC_FLAGS_KASAN_RUNTIME) 26ca734cc6SAndrey KonovalovCFLAGS_generic_report.o := $(CC_FLAGS_KASAN_RUNTIME) 27ca734cc6SAndrey KonovalovCFLAGS_init.o := $(CC_FLAGS_KASAN_RUNTIME) 28ca734cc6SAndrey KonovalovCFLAGS_quarantine.o := $(CC_FLAGS_KASAN_RUNTIME) 29ca734cc6SAndrey KonovalovCFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME) 30*bb359dbcSAndrey KonovalovCFLAGS_shadow.o := $(CC_FLAGS_KASAN_RUNTIME) 31ca734cc6SAndrey KonovalovCFLAGS_tags.o := $(CC_FLAGS_KASAN_RUNTIME) 32ca734cc6SAndrey KonovalovCFLAGS_tags_report.o := $(CC_FLAGS_KASAN_RUNTIME) 330b24beccSAndrey Ryabinin 34b266e8feSAndrey Konovalovobj-$(CONFIG_KASAN) := common.o report.o 35*bb359dbcSAndrey Konovalovobj-$(CONFIG_KASAN_GENERIC) += init.o generic.o generic_report.o shadow.o quarantine.o 36*bb359dbcSAndrey Konovalovobj-$(CONFIG_KASAN_SW_TAGS) += init.o shadow.o tags.o tags_report.o 37