1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2391e43daSPeter Zijlstra 3*04e49d92SMarco ElverCONTEXT_ANALYSIS_core.o := y 4*04e49d92SMarco ElverCONTEXT_ANALYSIS_fair.o := y 5*04e49d92SMarco Elver 637b47298SPeter Zijlstra# The compilers are complaining about unused variables inside an if(0) scope 737b47298SPeter Zijlstra# block. This is daft, shut them up. 837b47298SPeter Zijlstraccflags-y += $(call cc-disable-warning, unused-but-set-variable) 937b47298SPeter Zijlstra 105c9a8750SDmitry Vyukov# These files are disabled because they produce non-interesting flaky coverage 115c9a8750SDmitry Vyukov# that is not a function of syscall inputs. E.g. involuntary context switches. 125c9a8750SDmitry VyukovKCOV_INSTRUMENT := n 135c9a8750SDmitry Vyukov 146f3f0c98SMarco Elver# Disable KCSAN to avoid excessive noise and performance degradation. To avoid 156f3f0c98SMarco Elver# false positives ensure barriers implied by sched functions are instrumented. 160ebba714SMarco ElverKCSAN_SANITIZE := n 176f3f0c98SMarco ElverKCSAN_INSTRUMENT_BARRIERS := y 180ebba714SMarco Elver 19391e43daSPeter Zijlstraifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) 20391e43daSPeter Zijlstra# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is 21391e43daSPeter Zijlstra# needed for x86 only. Why this used to be enabled for all architectures is beyond 22391e43daSPeter Zijlstra# me. I suspect most platforms don't need this, but until we know that for sure 23391e43daSPeter Zijlstra# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k 24391e43daSPeter Zijlstra# to get a correct value for the wait-channel (WCHAN in ps). --davidm 25391e43daSPeter ZijlstraCFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer 26391e43daSPeter Zijlstraendif 27391e43daSPeter Zijlstra 282cbb20b0SJosh Poimboeuf# Branch profiling isn't noinstr-safe 292cbb20b0SJosh Poimboeufifdef CONFIG_TRACE_BRANCH_PROFILING 302cbb20b0SJosh PoimboeufCFLAGS_build_policy.o += -DDISABLE_BRANCH_PROFILING 312cbb20b0SJosh PoimboeufCFLAGS_build_utility.o += -DDISABLE_BRANCH_PROFILING 322cbb20b0SJosh Poimboeufendif 33801c1419SIngo Molnar# 34801c1419SIngo Molnar# Build efficiency: 35801c1419SIngo Molnar# 36801c1419SIngo Molnar# These compilation units have roughly the same size and complexity - so their 37801c1419SIngo Molnar# build parallelizes well and finishes roughly at once: 38801c1419SIngo Molnar# 39801c1419SIngo Molnarobj-y += core.o 40801c1419SIngo Molnarobj-y += fair.o 41f96eca43SIngo Molnarobj-y += build_policy.o 42801c1419SIngo Molnarobj-y += build_utility.o 43