rescue: Satisfy libifconfig's libnv dependency in crunched links

libifconfig now calls nv(9) routines for the SR-IOV VF status query, so
crunched builds that link the static library must also provide libnv.

The per-program CRUNCH_LIBS_ifconfig hook cannot do this: crunchgen
partially links per-program libraries into the program object and
crunchide then localizes every symbol except the stub entry, so members
absorbed there cannot satisfy references from another archive on the
final link's library list.

List libnv globally next to libifconfig.a in rescue(8) and bsdbox. This
also makes the existing per-program libnv links redundant; remove them
to avoid embedding private localized copies in the crunched binary.

Fixes:	2d6114f6d2 ("libifconfig: Add an SR-IOV VF status query")
This commit is contained in:
Kevin Bowling committed 2026-08-09 00:53:12 -07:00
1 parent c30021fe0d
commit fb1820d23a
3 files changed
+4 -5

No files matched your search

+3 -4
View File
@@ -124,7 +124,7 @@ CRUNCH_PROGS_sbin+= ipfw
.if ${MK_PF} != "no"
CRUNCH_PROGS_sbin+= pfctl
CRUNCH_LIBS_pfctl+= ${LIBPFCTL} ${LIBNV}
CRUNCH_LIBS_pfctl+= ${LIBPFCTL}
.endif
.if ${MK_ROUTED} != "no"
@@ -143,7 +143,7 @@ CRUNCH_PROGS_usr.sbin+= zdb
# CRUNCH_PROGS+= devd
CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma
CRUNCH_LIBS_camcontrol+= ${LIBNVMF} ${LIBNV}
CRUNCH_LIBS_camcontrol+= ${LIBNVMF}
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -lpthread -lumem -lspl -lrt
CRUNCH_LIBS_zfs+= ${LIBBE} \
@@ -261,10 +261,9 @@ CRUNCH_ALIAS_chown= chgrp
##################################################################
CRUNCH_LIBS+= ${OBJTOP}/lib/libifconfig/libifconfig.a
CRUNCH_LIBS+= -lnv
CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig
CRUNCH_LIBS_ifconfig+= ${LIBNV}
CRUNCH_LIBS+= -lm
.if ${MK_ISCSI} != "no"
+1
View File
@@ -71,6 +71,7 @@ CRUNCH_SRCDIRS+= sbin
CRUNCH_LIBS+= -l80211 -lalias -lcam -lcursesw -ldevstat -lipsec
# Don't forget this - ifconfig, etc -adrian
CRUNCH_LIBS+= ${OBJTOP}/lib/libifconfig/libifconfig.a
CRUNCH_LIBS+= -lnv
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs
CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig
-1
View File
@@ -20,7 +20,6 @@ CRUNCH_LIBS+= -lmemstat -lnetgraph
# ifconfig
CRUNCH_PROGS_sbin+= ifconfig
CRUNCH_LIBS_ifconfig+= ${LIBNV}
CRUNCH_SHLIBS+= -l80211
# wlan stuff