[PATCH] sched: Drop the never-defined $(PROFILING) from CFLAGS_core.o

From: Hui Su

Date: Thu Oct 22 2026 - 02:13:59 EST


$(PROFILING) is not defined anywhere in the build system, so
"CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer" expands to just
"-fno-omit-frame-pointer". The reference is left over from the days when
the scheduler build rules lived in kernel/Makefile; the ftrace compiler
options moved to CC_FLAGS_FTRACE in c0a80c0c27e5, and KBUILD_CFLAGS adds
those to every object.

Signed-off-by: Hui Su <sh_def@xxxxxxx>
---
kernel/sched/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
index b1f1a367034f..bd6f4e25e686 100644
--- a/kernel/sched/Makefile
+++ b/kernel/sched/Makefile
@@ -22,7 +22,7 @@ ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
# me. I suspect most platforms don't need this, but until we know that for sure
# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
# to get a correct value for the wait-channel (WCHAN in ps). --davidm
-CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
+CFLAGS_core.o := -fno-omit-frame-pointer
endif

# Branch profiling isn't noinstr-safe