From 2a4d73f3cfbdbe95cd6554ce1b9b73d1edbae8b7 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Thu, 27 Jul 2023 05:10:49 +0100 Subject: [PATCH] Makefile.inc1: Reinstate kbdcontrol bootstrap for BUILD_WITH_STRICT_TMPPATH During BUILD_WITH_STRICT_TMPPATH builds we need to symlink the host's kbdcontrol into WORLDTMP/legacy/bin so that it can be used. For completeness, also check if the host has it, since technically the host could have been built with WITHOUT_LEGACY_CONSOLE (though given nobody's screamed since this code was removed that's likely not something that gets hit in practice), and handle BOOTSTRAP_ALL_TOOLS (especially since that case will cover cross-building if and when kbdcontrol can be built on non-FreeBSD). This allows a BUILD_WITH_STRICT_TMPPATH tinderbox to pass. This partially reverts commit 33550b47391330362ea58984aa3fd691f6219ee0. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41202 --- Makefile.inc1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index f8d4b4333d99..af7d5b8ad0c5 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2374,6 +2374,19 @@ _crunchgen= usr.sbin/crunch/crunchgen _bootstrap_tools_links+=crunchgen .endif +# The ATKBD_DFLT_KEYMAP, UKBD_DFLT_KEYMAP and KBDMUX_DFLT_KEYMAP kernel options +# require kbdcontrol. Note that, even on FreeBSD, the host will lack kbdcontrol +# if built with WITHOUT_LEGACY_CONSOLE. +# +# XXX: kbdcontrol cannot currently be bootstrapped on non-FreeBSD systems +.if !defined(CROSSBUILD_HOST) +.if defined(BOOTSTRAP_ALL_TOOLS) || !exists(/usr/sbin/kbdcontrol) +_kbdcontrol= usr.sbin/kbdcontrol +.else +_bootstrap_tools_links+=kbdcontrol +.endif +.endif + .if ${MK_DISK_IMAGE_TOOLS_BOOTSTRAP} != "no" _etdump= usr.bin/etdump _makefs= usr.sbin/makefs