From d89d341282461654b52f3bce92b504254ed0683b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 11 Jan 2026 23:18:32 -0500 Subject: [PATCH] ldns-config: put $LIBS after -lldns Since $LIBS is the set of libraries used by -lldns, they need to come *after* it, not before, in order for the linker to properly check. This can be seen when using static libs e.g. `-static -lcrypto -lldns` as the OpenSSL crypto lib will be dropped by the linker since there are no references when processed, and then -lldns fails due to undefined symbols. --- packaging/ldns-config.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/ldns-config.in b/packaging/ldns-config.in index 623f77e54..c84a0b4e5 100755 --- a/packaging/ldns-config.in +++ b/packaging/ldns-config.in @@ -26,11 +26,11 @@ do fi if [ $arg = "--libs" ] then - echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns" + echo "${LDFLAGS} -L${LIBDIR} -lldns ${LIBS}" fi if [ $arg = "--python-libs" ] then - echo "${LDFLAGS} ${PYTHON_LDFLAGS} -L${LIBDIR} ${LIBS} -lldns" + echo "${LDFLAGS} ${PYTHON_LDFLAGS} -L${LIBDIR} -lldns ${LIBS}" fi if [ $arg = "-h" ] || [ $arg = "--help" ] then