git: 3aaed4cb8c6a - main - Fix conflict between libnvpair and libnv when building rescue binaries.

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 24 May 2022 20:59:56 UTC
The branch main has been updated by kib:

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

commit 3aaed4cb8c6a7dd3441b3d89501a79581179e288
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-04-12 02:23:44 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-05-24 20:59:33 +0000

    Fix conflict between libnvpair and libnv when building rescue binaries.
    
    Submitted by:   hselasky
    Reviewed by:    jhb
    Sponsored by:   NVIDIA Networking
    MFC after:      3 weeks
    Differential revision:  https://reviews.freebsd.org/D32551
---
 rescue/rescue/Makefile | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index 216656be36a9..3c758a41f294 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -137,8 +137,18 @@ CRUNCH_PROGS_usr.sbin+= zdb
 
 CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma
 .if ${MK_ZFS} != "no"
-CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
-CRUNCH_LIBS+= -lbe -lzfsbootenv -lzutil -ltpool -lspl -licp_rescue
+CRUNCH_LIBS+= -lavl -lpthread -luutil -lumem -ltpool -lspl
+CRUNCH_LIBS_zfs+=	${LIBBE} \
+			${LIBZPOOL} \
+			${LIBZUTIL} \
+			${LIBZFS} \
+			${LIBZFS_CORE} \
+			${LIBZFSBOOTENV} \
+			${LIBICP_RESCUE} \
+			${LIBNVPAIR}
+CRUNCH_LIBS_bectl+=	${CRUNCH_LIBS_zfs}
+CRUNCH_LIBS_zpool+=	${CRUNCH_LIBS_zfs}
+CRUNCH_LIBS_zdb+=	${CRUNCH_LIBS_zfs}
 .else
 # liblzma needs pthread
 CRUNCH_LIBS+= -lpthread
@@ -235,6 +245,8 @@ CRUNCH_ALIAS_chown= chgrp
 CRUNCH_LIBS+=		${OBJTOP}/lib/libifconfig/libifconfig.a
 CRUNCH_BUILDOPTS+=	CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig
 
+CRUNCH_LIBS_ifconfig+=	${LIBNV}
+
 CRUNCH_LIBS+= -lm
 
 .if ${MK_ISCSI} != "no"