xref: /linux/kernel/sched/Makefile (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2391e43daSPeter Zijlstra
337b47298SPeter Zijlstra# The compilers are complaining about unused variables inside an if(0) scope
437b47298SPeter Zijlstra# block. This is daft, shut them up.
537b47298SPeter Zijlstraccflags-y += $(call cc-disable-warning, unused-but-set-variable)
637b47298SPeter Zijlstra
75c9a8750SDmitry Vyukov# These files are disabled because they produce non-interesting flaky coverage
85c9a8750SDmitry Vyukov# that is not a function of syscall inputs. E.g. involuntary context switches.
95c9a8750SDmitry VyukovKCOV_INSTRUMENT := n
105c9a8750SDmitry Vyukov
116f3f0c98SMarco Elver# Disable KCSAN to avoid excessive noise and performance degradation. To avoid
126f3f0c98SMarco Elver# false positives ensure barriers implied by sched functions are instrumented.
130ebba714SMarco ElverKCSAN_SANITIZE := n
146f3f0c98SMarco ElverKCSAN_INSTRUMENT_BARRIERS := y
150ebba714SMarco Elver
16391e43daSPeter Zijlstraifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
17391e43daSPeter Zijlstra# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
18391e43daSPeter Zijlstra# needed for x86 only.  Why this used to be enabled for all architectures is beyond
19391e43daSPeter Zijlstra# me.  I suspect most platforms don't need this, but until we know that for sure
20391e43daSPeter Zijlstra# I turn this off for IA-64 only.  Andreas Schwab says it's also needed on m68k
21391e43daSPeter Zijlstra# to get a correct value for the wait-channel (WCHAN in ps). --davidm
22391e43daSPeter ZijlstraCFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
23391e43daSPeter Zijlstraendif
24391e43daSPeter Zijlstra
25*2cbb20b0SJosh Poimboeuf# Branch profiling isn't noinstr-safe
26*2cbb20b0SJosh Poimboeufifdef CONFIG_TRACE_BRANCH_PROFILING
27*2cbb20b0SJosh PoimboeufCFLAGS_build_policy.o += -DDISABLE_BRANCH_PROFILING
28*2cbb20b0SJosh PoimboeufCFLAGS_build_utility.o += -DDISABLE_BRANCH_PROFILING
29*2cbb20b0SJosh Poimboeufendif
30801c1419SIngo Molnar#
31801c1419SIngo Molnar# Build efficiency:
32801c1419SIngo Molnar#
33801c1419SIngo Molnar# These compilation units have roughly the same size and complexity - so their
34801c1419SIngo Molnar# build parallelizes well and finishes roughly at once:
35801c1419SIngo Molnar#
36801c1419SIngo Molnarobj-y += core.o
37801c1419SIngo Molnarobj-y += fair.o
38f96eca43SIngo Molnarobj-y += build_policy.o
39801c1419SIngo Molnarobj-y += build_utility.o
40