git: 98ad84afd252 - stable/13 - src.libnames.mk: Add hack to workaround libarchive not being bootstrapped

From: Jessica Clarke <jrtc27_at_FreeBSD.org>
Date: Tue, 25 Jan 2022 01:39:56 UTC
The branch stable/13 has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=98ad84afd2523a785cdd9b0ccb9a7125f4db2e34

commit 98ad84afd2523a785cdd9b0ccb9a7125f4db2e34
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2021-12-06 19:06:16 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2022-01-24 23:59:07 +0000

    src.libnames.mk: Add hack to workaround libarchive not being bootstrapped
    
    We don't currently honour _DP_foo when bootstrapping on non-FreeBSD, and
    so none of these values matter, but the next commit will change that as
    we do need to pull in dependencies for libdwarf. We should really be
    bootstrapping our libarchive for ar anyway rather than using the host's,
    as well as have a better way to communicate to src.libnames.mk whether
    or not a library is being bootstrapped.
    
    MFC after:      1 week
    
    (cherry picked from commit ed4050750c1ab35b1017afa7a998fbc8a62de454)
---
 share/mk/src.libnames.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index d1d8b60c51fe..8fd7547630a3 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -255,7 +255,11 @@ LIBVERIEXEC?=	${LIBVERIEXECDIR}/libveriexec.a
 # 2nd+ order consumers.  Auto-generating this would be better.
 _DP_80211=	sbuf bsdxml
 _DP_9p=		sbuf
+# XXX: Not bootstrapped so uses host version on non-FreeBSD, so don't use a
+# FreeBSD-specific dependency list
+.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)
 _DP_archive=	z bz2 lzma bsdxml zstd
+.endif
 _DP_avl=	spl
 _DP_zstd=	pthread
 .if ${MK_BLACKLIST} != "no"