build/kernel: use bundled kldxref to write correct linker.hints file

This commit is contained in:
Franco Fichtner 2022-01-18 08:34:19 +01:00
parent 4dbd9be1ca
commit d81be06129
1 changed files with 7 additions and 6 deletions

View File

@ -106,12 +106,13 @@ if [ -n "$(test -f ${DEBUG_OBJ} && tar -tf ${DEBUG_OBJ})" ]; then
KERNELSET=${KERNEL_DEBUG_SET}
fi
# attempt to build the proper kldxref to avoid
# checksum data mismatch on bundled linker.hints
make -sC ${SRCDIR}/usr.sbin/kldxref clean all
BASE_OBJDIR="$(make -C${SRCDIR}/usr.sbin -v .OBJDIR ${MAKE_ARGS})"
${BASE_OBJDIR}/kldxref/kldxref -R ${STAGEDIR}/work/boot/kernel
make -sC ${SRCDIR}/usr.sbin/kldxref clean
setup_version ${STAGEDIR} ${STAGEDIR}/work ${SELF}
# XXX There is an issue with kldxref being used from the host system
# instead of the one bundled with the build: it creates a different
# linker.hints file so building stable/13 on releng/13.0 really bundles
# the wrong linker.hints file which gets added to integrity check and
# and then fails integrity after being installed in the actual stable/13
# system due to kldxref use.
generate_set ${STAGEDIR}/work ${KERNELSET}
generate_signature ${KERNELSET}