build/kernel: with a heavy heart require base build...
... and set up a chroot environment to run the proper kldxref in the isolated environment. It turns out that building kldxref manually in the host builds one for the host likely with the help of /usr/include and this fails again for the forward build. It's the facepalm of the week.
This commit is contained in:
parent
adc0ee4a12
commit
721f25f65f
1
Makefile
1
Makefile
|
@ -127,6 +127,7 @@ SRCDIR?= ${ROOTDIR}/src
|
|||
|
||||
# A couple of meta-targets for easy use and ordering:
|
||||
|
||||
kernel: base
|
||||
ports distfiles: base
|
||||
audit plugins: ports
|
||||
core: plugins
|
||||
|
|
|
@ -97,8 +97,10 @@ ${ENV_FILTER} make -s -C${SRCDIR}/release kernel.txz ${MAKE_ARGS}
|
|||
sh ./clean.sh ${SELF}
|
||||
|
||||
setup_stage ${STAGEDIR} work
|
||||
setup_set ${STAGEDIR}/work ${KERNEL_OBJ}
|
||||
setup_base ${STAGEDIR}
|
||||
setup_chroot ${STAGEDIR}
|
||||
|
||||
setup_set ${STAGEDIR}/work ${KERNEL_OBJ}
|
||||
KERNELSET=${KERNEL_RELEASE_SET}
|
||||
|
||||
if [ -n "$(test -f ${DEBUG_OBJ} && tar -tf ${DEBUG_OBJ})" ]; then
|
||||
|
@ -106,12 +108,8 @@ 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
|
||||
# avoid wrong linker.hints checksum with correct base utility
|
||||
chroot ${STAGEDIR} /usr/sbin/kldxref -R /work/boot/kernel
|
||||
|
||||
setup_version ${STAGEDIR} ${STAGEDIR}/work ${SELF}
|
||||
generate_set ${STAGEDIR}/work ${KERNELSET}
|
||||
|
|
Loading…
Reference in New Issue