git: 3b073d2ee50c - main - tools/build: Always bootstrap (sys/)bitstring.h

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 09 Jan 2023 19:18:13 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=3b073d2ee50c042e7d83e5b18fd8b11ce827e632

commit 3b073d2ee50c042e7d83e5b18fd8b11ce827e632
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-01-09 19:09:48 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-01-09 19:17:48 +0000

    tools/build: Always bootstrap (sys/)bitstring.h
    
    Older, supported FreeBSD versions lack bit_ntest() so hoist the boostrap
    installation out of the OS!=FreeBSD case and always install it.  A more
    precise criteria is possible, but would add little value.
    
    This fixes bootstrapping makefs as a build tool on 13.1.
    
    Reviewed by:    jrtc27, emaste
    Sponsored by:   DARPA, AFRL
    Differential Revision:  https://reviews.freebsd.org/D37951
---
 tools/build/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/build/Makefile b/tools/build/Makefile
index 8c723e8be73c..53a735ae6295 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -150,6 +150,11 @@ INCS+=	${SRCTOP}/include/nlist.h
 SYSINCS+=	${SRCTOP}/sys/sys/imgact_aout.h
 SYSINCS+=	${SRCTOP}/sys/sys/nlist_aout.h
 
+# macOS's bitstring lacks FreeBSD-specific additions used by makefs's ZFS code
+# and Linux doesn't have it at all.  Older FreeBSD versions lack recent
+# additions.
+INCS+=	${SRCTOP}/include/bitstring.h
+SYSINCS+=	${SRCTOP}/sys/sys/bitstring.h
 
 .if ${.MAKE.OS} != "FreeBSD"
 .PATH: ${.CURDIR}/cross-build
@@ -157,11 +162,6 @@ SYSINCS+=	${SRCTOP}/sys/sys/nlist_aout.h
 # Needed by our sys/types.h wrapper
 SYSINCS+=	${SRCTOP}/sys/sys/bitcount.h
 
-# macOS's bitstring lacks FreeBSD-specific additions used by makefs's ZFS code
-# and Linux doesn't have it at all.
-INCS+=	${SRCTOP}/include/bitstring.h
-SYSINCS+=	${SRCTOP}/sys/sys/bitstring.h
-
 # dbopen() behaves differently on Linux and FreeBSD so we ensure that we
 # bootstrap the FreeBSD db code. The cross-build headers #define dbopen() to
 # __freebsd_dbopen() so that we don't ever use the host version