git: f5949447047d - main - krb5: Don't include libsys in LIBADD

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 09 Nov 2026 18:26:10 UTC
The branch main has been updated by jhb:

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

commit f5949447047d8dd0961d162c85d0ef47bd9ca08a
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-11-09 18:25:42 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-11-09 18:25:42 +0000

    krb5: Don't include libsys in LIBADD
    
    This has the curious effect of placing libsys before libc in the link
    order even though libc links against libsys.  While this happens to
    work currently, it is fragile and fails to link properly in some edge
    cases.
    
    Sponsored by:   AFRL, DARPA
    Differential Revision:  https://reviews.freebsd.org/D60724
---
 krb5/libexec/kprop/Makefile         | 2 +-
 krb5/plugins/k5tls/Makefile         | 2 +-
 krb5/plugins/preauth/spake/Makefile | 2 +-
 krb5/usr.bin/gss-client/Makefile    | 2 +-
 krb5/usr.bin/kdestroy/Makefile      | 2 +-
 krb5/usr.bin/klist/Makefile         | 2 +-
 krb5/usr.bin/kpasswd/Makefile       | 2 +-
 krb5/usr.bin/ksu/Makefile           | 2 +-
 krb5/usr.bin/kswitch/Makefile       | 2 +-
 krb5/usr.bin/ktutil/Makefile        | 2 +-
 krb5/usr.bin/kvno/Makefile          | 2 +-
 krb5/usr.bin/sclient/Makefile       | 2 +-
 krb5/usr.bin/sim_client/Makefile    | 2 +-
 krb5/usr.sbin/gss-server/Makefile   | 2 +-
 krb5/usr.sbin/sim_server/Makefile   | 2 +-
 krb5/usr.sbin/sserver/Makefile      | 2 +-
 16 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/krb5/libexec/kprop/Makefile b/krb5/libexec/kprop/Makefile
index 5bac7d9e6dcf..6e5d8940a98c 100644
--- a/krb5/libexec/kprop/Makefile
+++ b/krb5/libexec/kprop/Makefile
@@ -11,7 +11,7 @@
 
 PROG=	kprop
 
-LIBADD=	kprop_util krb5 k5crypto com_err krb5profile krb5support util sys
+LIBADD=	kprop_util krb5 k5crypto com_err krb5profile krb5support util
 
 SRCS=	kprop.c
 
diff --git a/krb5/plugins/k5tls/Makefile b/krb5/plugins/k5tls/Makefile
index b5dbe66dab5c..8b6078b76d20 100644
--- a/krb5/plugins/k5tls/Makefile
+++ b/krb5/plugins/k5tls/Makefile
@@ -15,7 +15,7 @@ LIBDIR=		${PLUGINSDIR}/tls
 SHLIBDIR=	${LIBDIR}
 LIB=		k5tls
 LDFLAGS+=-Wl,--no-undefined
-LIBADD=	krb5 krb5profile krb5support ssl crypto k5crypto com_err sys
+LIBADD=	krb5 krb5profile krb5support ssl crypto k5crypto com_err
 VERSION_MAP=	${.CURDIR}/version.map
 
 SRCS=	notls.c \
diff --git a/krb5/plugins/preauth/spake/Makefile b/krb5/plugins/preauth/spake/Makefile
index bd87ea0eb6e0..cd9792679731 100644
--- a/krb5/plugins/preauth/spake/Makefile
+++ b/krb5/plugins/preauth/spake/Makefile
@@ -14,7 +14,7 @@
 LIB=		spake
 LIBDIR=		${PLUGINSDIR}/preauth
 LDFLAGS+=-Wl,--no-undefined
-LIBADD=	krb5profile krb5 k5crypto com_err krb5support crypto sys
+LIBADD=	krb5profile krb5 k5crypto com_err krb5support crypto
 VERSION_MAP=	${.CURDIR}/version.map
 
 .PATH:	${KRB5_DIR}/plugins/preauth/spake
diff --git a/krb5/usr.bin/gss-client/Makefile b/krb5/usr.bin/gss-client/Makefile
index 6e1e09801580..5b3d23bad24b 100644
--- a/krb5/usr.bin/gss-client/Makefile
+++ b/krb5/usr.bin/gss-client/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	gss-client
 
-LIBADD=	gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	gss-client.c \
 	gss-misc.c
diff --git a/krb5/usr.bin/kdestroy/Makefile b/krb5/usr.bin/kdestroy/Makefile
index 56feb97d93f7..265e378d0930 100644
--- a/krb5/usr.bin/kdestroy/Makefile
+++ b/krb5/usr.bin/kdestroy/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	kdestroy
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	kdestroy.c
 
diff --git a/krb5/usr.bin/klist/Makefile b/krb5/usr.bin/klist/Makefile
index 8628636c49a2..41a4c584dad3 100644
--- a/krb5/usr.bin/klist/Makefile
+++ b/krb5/usr.bin/klist/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	klist
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	klist.c
 
diff --git a/krb5/usr.bin/kpasswd/Makefile b/krb5/usr.bin/kpasswd/Makefile
index a3cefe3013bb..fd58476f0d24 100644
--- a/krb5/usr.bin/kpasswd/Makefile
+++ b/krb5/usr.bin/kpasswd/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	kpasswd
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	kpasswd.c
 
diff --git a/krb5/usr.bin/ksu/Makefile b/krb5/usr.bin/ksu/Makefile
index 6c0ee9f0a776..a7582f7dc01d 100644
--- a/krb5/usr.bin/ksu/Makefile
+++ b/krb5/usr.bin/ksu/Makefile
@@ -13,7 +13,7 @@ BINMODE=4555
 PRECIOUSPROG=
 .endif
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	authorization.c \
 	ccache.c \
diff --git a/krb5/usr.bin/kswitch/Makefile b/krb5/usr.bin/kswitch/Makefile
index 70c793729fcc..197654e6c177 100644
--- a/krb5/usr.bin/kswitch/Makefile
+++ b/krb5/usr.bin/kswitch/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	kswitch
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	kswitch.c
 
diff --git a/krb5/usr.bin/ktutil/Makefile b/krb5/usr.bin/ktutil/Makefile
index 0cbdb61abc15..6a2a952003d8 100644
--- a/krb5/usr.bin/ktutil/Makefile
+++ b/krb5/usr.bin/ktutil/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	ktutil
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support krb5ss sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support krb5ss
 
 SRCS=	ktutil.c \
 	ktutil_ct.c \
diff --git a/krb5/usr.bin/kvno/Makefile b/krb5/usr.bin/kvno/Makefile
index b3bf92e62080..0bb7ab22181a 100644
--- a/krb5/usr.bin/kvno/Makefile
+++ b/krb5/usr.bin/kvno/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	kvno
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	kvno.c
 
diff --git a/krb5/usr.bin/sclient/Makefile b/krb5/usr.bin/sclient/Makefile
index 62c0c63c16b2..a55ffe20cee4 100644
--- a/krb5/usr.bin/sclient/Makefile
+++ b/krb5/usr.bin/sclient/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	sclient
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	sclient.c
 
diff --git a/krb5/usr.bin/sim_client/Makefile b/krb5/usr.bin/sim_client/Makefile
index ed3b2af88e1b..a7bb22231622 100644
--- a/krb5/usr.bin/sim_client/Makefile
+++ b/krb5/usr.bin/sim_client/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	sim_client
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	sim_client.c
 
diff --git a/krb5/usr.sbin/gss-server/Makefile b/krb5/usr.sbin/gss-server/Makefile
index ee4c0615b551..d6f5c8e28b90 100644
--- a/krb5/usr.sbin/gss-server/Makefile
+++ b/krb5/usr.sbin/gss-server/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	gss-server
 
-LIBADD=	gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	gss-server.c \
 	gss-misc.c
diff --git a/krb5/usr.sbin/sim_server/Makefile b/krb5/usr.sbin/sim_server/Makefile
index 898e78f7e928..93c3abd732af 100644
--- a/krb5/usr.sbin/sim_server/Makefile
+++ b/krb5/usr.sbin/sim_server/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	sim_server
 
-LIBADD= krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD= krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	sim_server.c
 
diff --git a/krb5/usr.sbin/sserver/Makefile b/krb5/usr.sbin/sserver/Makefile
index c641795b548d..009b69f8388b 100644
--- a/krb5/usr.sbin/sserver/Makefile
+++ b/krb5/usr.sbin/sserver/Makefile
@@ -9,7 +9,7 @@
 
 PROG=	sserver
 
-LIBADD=	krb5 k5crypto com_err krb5profile krb5support sys
+LIBADD=	krb5 k5crypto com_err krb5profile krb5support
 
 SRCS=	sserver.c