The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ce243df20aa8ba94918cafdca2537c8cd18887c8
commit ce243df20aa8ba94918cafdca2537c8cd18887c8 Author: Olivier Certner <[email protected]> AuthorDate: 2026-06-03 13:11:52 +0000 Commit: Olivier Certner <[email protected]> CommitDate: 2026-06-03 15:02:39 +0000 i386: Fix build (of 'genassym.o') i386's genassym.c needs to define some assembly symbols holding the size of NFS structures to support NFS_ROOT while booting with a nfs_diskless structure. For this, it needs to include a few NFS headers, which require definitions from <sys/mount.h> (fhandle_t, vfs_init_t), which was removed by commit 72ab129799a2 ("x86: remove sys/mount.h from genassym.c"). Since recently, <sys/mount.h> has been including <sys/vnode.h>, so needs "vnode_if.h" to have been generated for the compilation of 'genassym.o' not to fail. Make sure this is the case (for all architectures for simplicity) by tweaking the rule for 'genassym.o' in 'sys/conf/kern.post.mk', leaving a comment there so that it can be removed when i386 is dropped (or if the above-mentioned dependency is broken). Fixes: 72ab129799a2 ("x86: remove sys/mount.h from genassym.c") Sponsored by: The FreeBSD Foundation --- sys/conf/kern.post.mk | 5 ++++- sys/i386/i386/genassym.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 7216393dbdf1..2abf1889d33b 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -260,7 +260,10 @@ genoffset_test.o: $S/kern/genoffset.c offset.inc assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} -genassym.o: $S/$M/$M/genassym.c offset.inc +# vnode_if.h added for the sake of i386 only to fix commit 72ab129799a2 ("x86: +# remove sys/mount.h from genassym.c"). Can be removed as soon as i386 kernels +# are dropped, or if the <sys/mount.h> -> <sys/vnode.h> dependency vanishes. +genassym.o: $S/$M/$M/genassym.c offset.inc vnode_if.h ${CC} -c ${NOSAN_CFLAGS:N-flto*:N-fno-common} \ -fcommon $S/$M/$M/genassym.c diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index 1a31f6b3428c..9f994b9ca9d8 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -45,6 +45,7 @@ #endif #include <sys/proc.h> #include <sys/errno.h> +#include <sys/mount.h> #include <sys/mutex.h> #include <sys/socket.h> #include <sys/resourcevar.h>
