git: e89d0e74e23e - main - sched: Fix building kernel independently of world

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Tue, 03 Nov 2026 22:55:55 UTC
The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=e89d0e74e23e95fa79989a9053e788e6378eee07

commit e89d0e74e23e95fa79989a9053e788e6378eee07
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-11-03 21:31:11 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-11-03 22:54:01 +0000

    sched: Fix building kernel independently of world
    
    Regular '-I' directives must be passed to ${CPP} so that when
    pre-processed, 'sched_ns.h' can find the files it includes in the proper
    places, instead of relying on what is in ${WORLDTMP}, i.e., nothing if
    '_includes' was not executed, which happens, e.g., when using 'make
    kernel-toolchain' and then 'make buildkernel' without having executed
    a 'make buildworld', or possibly some outdated copy not matching an
    updated source.
    
    Reported by:    Claude Opus 5.5, imp
    Fixes:          510331fa3763 ("sched: Automatically namespace schedulers' implementation functions")
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61167
---
 sys/conf/files | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index 3bc46035c816..a769d3043e74 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4721,7 +4721,7 @@ kern/sched_4bsd.c		optional sched_4bsd
 sched_4bsd_ns.h			optional sched_4bsd \
 	dependency		"$S/kern/sched_ns.h $S/sys/sched.h \
 	$S/tools/sched_impl_ns.awk" \
-	compile-with		"${CPP} -DSCHED_IMPLEMENTATION=4bsd \
+	compile-with		"${CPP} ${INCLUDES} -DSCHED_IMPLEMENTATION=4bsd \
 	$S/kern/sched_ns.h | \
 	${AWK} -f $S/tools/sched_impl_ns.awk > ${.TARGET}" \
 	no-obj no-implicit-rule before-depend local \
@@ -4730,7 +4730,7 @@ kern/sched_ule.c		optional sched_ule
 sched_ule_ns.h			optional sched_ule \
 	dependency		"$S/kern/sched_ns.h $S/sys/sched.h \
 	$S/tools/sched_impl_ns.awk" \
-	compile-with		"${CPP} -DSCHED_IMPLEMENTATION=ule \
+	compile-with		"${CPP} ${INCLUDES} -DSCHED_IMPLEMENTATION=ule \
 	$S/kern/sched_ns.h | \
 	${AWK} -f $S/tools/sched_impl_ns.awk > ${.TARGET}" \
 	no-obj no-implicit-rule before-depend local \