Don't try and run kldxref for arm kernels

Surprisingly, kldxref does not currently support arm, and unhelpfully
this means it silently does nothing rather than give an error, so the
linker.hints entry added to the METALOG for -DNO_ROOT builds (and
pkgbase ones) refers to a file that doesn't exist. Ideally it would be
supported (and ideally the METALOG handling would be less fragile, but
without integrating it into kldxref the only real option would be to
just run find(1) to get the list of linker.hints files, which feels a
little backwards), but for now just paper over this by skipping the
build step on arm.

Reported by:	bapt
Fixes:		ff7c12c1f1 ("Make kldxref a bootstrap tool and use unconditionally")
This commit is contained in:
Jessica Clarke 2023-12-14 16:40:08 +00:00
parent d1ce87ae0d
commit 0840bdbf2a
2 changed files with 4 additions and 2 deletions

View file

@ -354,7 +354,8 @@ _kmodinstall: .PHONY
.include <bsd.links.mk>
.if !defined(NO_XREF)
# XXX: kldxref lacks support for arm
.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm"
afterinstall: _kldxref
.ORDER: realinstall _kldxref
.ORDER: _installlinks _kldxref

View file

@ -908,7 +908,8 @@ SUBDIR:= ${SUBDIR:N${reject}}
.endif # MODULES_OVERRIDE -- Keep last
# Calling kldxref(8) for each module is expensive.
.if !defined(NO_XREF)
# XXX: kldxref lacks support for arm
.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm"
.MAKEFLAGS+= -DNO_XREF
afterinstall: .PHONY
${KLDXREF_CMD} ${DESTDIR}${KMODDIR}