aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2023-12-14 16:40:08 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2023-12-14 16:40:08 +0000
commit0840bdbf2a07b68e29267bc49057ca6df2351360 (patch)
tree9ac64f45921a569c1c4dc52695739501d3cc5a65
parentd1ce87ae0ddca413b098b6be8f5d3b4da87422ef (diff)
downloadsrc-0840bdbf2a07b68e29267bc49057ca6df2351360.tar.gz
src-0840bdbf2a07b68e29267bc49057ca6df2351360.zip
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: ff7c12c1f17e ("Make kldxref a bootstrap tool and use unconditionally")
-rw-r--r--sys/conf/kmod.mk3
-rw-r--r--sys/modules/Makefile3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 5d4dcd4371bc..4482034baf67 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -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
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index c14933eebda4..dc914946ff41 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -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}