src.libnames.mk: Apply -L also for privatelibs

For INTERNALLIBS and regular libs we add -L to specify the library path,
which may be needed if a library is in a non-default path but also means
we can link against those libraries when built independently.  Do the
same for privatelibs as well.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48891
This commit is contained in:
Ed Maste
2025-02-07 13:00:44 -05:00
parent 1070477cc8
commit 5bb9236d27
+1 -1
View File
@@ -494,7 +494,7 @@ LDADD_${_l}_L+= -L${LIB${_l:tu}DIR}
.endif
DPADD_${_l}?= ${LIB${_l:tu}}
.if ${_PRIVATELIBS:M${_l}}
LDADD_${_l}?= -lprivate${_l}
LDADD_${_l}?= ${LDADD_${_l}_L} -lprivate${_l}
.elif ${_INTERNALLIBS:M${_l}}
LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l:S/${PIE_SUFFIX}//}${PIE_SUFFIX}
.else