The branch main has been updated by ngie:

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

commit f2e6a8b9e50c7552037cb635f17b955ead84a813
Author:     Enji Cooper <[email protected]>
AuthorDate: 2026-07-16 21:48:37 +0000
Commit:     Enji Cooper <[email protected]>
CommitDate: 2026-07-16 21:56:29 +0000

    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
---
 lib/libproc/Makefile     | 2 +-
 share/mk/src.libnames.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile
index 670c4399f63e..2a475c292975 100644
--- a/lib/libproc/Makefile
+++ b/lib/libproc/Makefile
@@ -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
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index e1ffecddc25a..b3c4e1861e24 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -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

Reply via email to