git: 5bb9236d278f - main - src.libnames.mk: Apply -L also for privatelibs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Feb 2025 19:00:42 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=5bb9236d278f026d7e8845f290c7aa2d5367800d
commit 5bb9236d278f026d7e8845f290c7aa2d5367800d
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-02-07 18:00:44 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-02-09 19:00:29 +0000
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
---
share/mk/src.libnames.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index 02a495db7711..be8db2dc1540 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -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