libproc: link against libctf if MK_CTF != no instead of MK_CDDL != no

Logic prior to this change would incorrectly try linking when MK_CDDL != no,
instead of MK_CTF != no, which could result in the library and the tests being
broken if/when MK_CTF == no and MK_CDDL != no (an uncommon, but possible
combination with today's build knobs).

This change updates the conditional to correctly track the value of MK_CTF, which
in turn is properly toggled to no if/when MK_CDDL == no as it's a dependent build
knob.

This [niche] build bug has been present in FreeBSD since 2014.

MFC after:	1 week
This commit is contained in:
Enji Cooper committed 2026-07-16 14:56:29 -07:00
1 parent 605e699cd6
commit f2e6a8b9e5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ CFLAGS+= -I${.CURDIR}
LIBADD+= cxxrt elf procstat rtld_db util z
.if ${MK_CDDL} != "no"
.if ${MK_CTF} != "no"
LIBADD+= ctf
IGNORE_PRAGMA= YES
CFLAGS+= -DIN_BASE
+1 -1
View File
@@ -412,7 +412,7 @@ _DP_pam+= ypclnt
_DP_pfctl= nv
_DP_pjdlog= util
_DP_proc= cxxrt
.if ${MK_CDDL} != "no"
.if ${MK_CTF} != "no"
_DP_proc+= ctf
.endif
_DP_proc+= elf procstat rtld_db util z