Date: Sun, 09 Aug 2026 07:58:54 +0000 From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: fb1820d23a04 - main - rescue: Satisfy libifconfig's libnv dependency in crunched links Message-ID: <6a78333e.204f3.486aed61@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fb1820d23a04856a6d3047b4c088cc8df8f76da1 commit fb1820d23a04856a6d3047b4c088cc8df8f76da1 Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2026-08-09 07:28:17 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2026-08-09 07:53:12 +0000 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: 2d6114f6d26b ("libifconfig: Add an SR-IOV VF status query") --- rescue/rescue/Makefile | 7 +++---- tools/bsdbox/Makefile | 1 + tools/bsdbox/Makefile.net | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 2ac475cca10c..e65ad75d54af 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -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" diff --git a/tools/bsdbox/Makefile b/tools/bsdbox/Makefile index 35e37b31ea2f..ab962c8920c6 100644 --- a/tools/bsdbox/Makefile +++ b/tools/bsdbox/Makefile @@ -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 diff --git a/tools/bsdbox/Makefile.net b/tools/bsdbox/Makefile.net index d0f7654c41d7..960bc8a25335 100644 --- a/tools/bsdbox/Makefile.net +++ b/tools/bsdbox/Makefile.net @@ -20,7 +20,6 @@ CRUNCH_LIBS+= -lmemstat -lnetgraph # ifconfig CRUNCH_PROGS_sbin+= ifconfig -CRUNCH_LIBS_ifconfig+= ${LIBNV} CRUNCH_SHLIBS+= -l80211 # wlan stuffhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a78333e.204f3.486aed61>
