Module Name:    src
Committed By:   pooka
Date:           Tue Nov 13 22:30:38 UTC 2012

Modified Files:
        src/share/mk: bsd.README bsd.lib.mk

Log Message:
Make it easier build binaries against the host's libs, e.g.
libpthread which might be in /lib/x86_64-linux-gnu/libpthread.so.0
or some other unholy place.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/share/mk/bsd.README
cvs rdiff -u -r1.324 -r1.325 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.306 src/share/mk/bsd.README:1.307
--- src/share/mk/bsd.README:1.306	Sun Nov  4 16:27:28 2012
+++ src/share/mk/bsd.README	Tue Nov 13 22:30:38 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.306 2012/11/04 16:27:28 christos Exp $
+#	$NetBSD: bsd.README,v 1.307 2012/11/13 22:30:38 pooka Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1165,6 +1165,11 @@ LIBDPLIBS	A list of the tuples:
 		     *	DPADD gets  ${LIBDO.libname}/liblibname.so  or
 				    ${LIBDO.libname}/liblibname.a   added.
 
+		The special value "_external" for LIBDO.lib makes the
+		build system to assume the library comes from outside
+		of the NetBSD source tree and only causes -llibname
+		to be added to LDADD.
+
 		This variable may be used for individual libraries, as
 		well as in parent directories to cache common libraries
 		as a build-time optimization.

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.324 src/share/mk/bsd.lib.mk:1.325
--- src/share/mk/bsd.lib.mk:1.324	Thu Aug 23 21:21:16 2012
+++ src/share/mk/bsd.lib.mk	Tue Nov 13 22:30:38 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.324 2012/08/23 21:21:16 joerg Exp $
+#	$NetBSD: bsd.lib.mk,v 1.325 2012/11/13 22:30:38 pooka Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -54,8 +54,12 @@ AFLAGS+=        ${PIE_AFLAGS}
 LIBDO.${_lib}!=	cd "${_dir}" && ${PRINTOBJDIR}
 .MAKEOVERRIDES+=LIBDO.${_lib}
 .endif
+.if ${LIBDO.${_lib}} == "_external"
+LDADD+=		-l${_lib}
+.else
 LDADD+=		-L${LIBDO.${_lib}} -l${_lib}
 DPADD+=		${LIBDO.${_lib}}/lib${_lib}.so
+.endif
 .endfor
 .endif									# }
 

Reply via email to