Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 2014 22:17:26 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269648 - in head: . gnu/usr.bin/gdb gnu/usr.bin/gdb/gdb gnu/usr.bin/gdb/gdbtui gnu/usr.bin/gdb/kgdb kerberos5/lib/libkrb5 kerberos5/libexec/digest-service kerberos5/libexec/kcm lib/lib...
Message-ID:  <53e2a976.53a9.7276309d@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Wed Aug  6 22:17:26 2014
New Revision: 269648
URL: http://svnweb.freebsd.org/changeset/base/269648

Log:
  Rework privatelib/internallib
  
  Make sure everything linking to a privatelib and/or an internallib does it directly
  from the OBJDIR rather than DESTDIR.
  Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing
  in final installation
  Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to
  internal/privatelib
  Directly link to the .so in case of private library to avoid having to complexify
  LDFLAGS.
  
  Phabric:	https://phabric.freebsd.org/D553
  Reviewed by:	imp, emaste

Added:
  head/share/mk/src.libnames.mk   (contents, props changed)
Modified:
  head/ObsoleteFiles.inc
  head/gnu/usr.bin/gdb/Makefile.inc
  head/gnu/usr.bin/gdb/gdb/Makefile
  head/gnu/usr.bin/gdb/gdbtui/Makefile
  head/gnu/usr.bin/gdb/kgdb/Makefile
  head/kerberos5/lib/libkrb5/Makefile
  head/kerberos5/libexec/digest-service/Makefile
  head/kerberos5/libexec/kcm/Makefile
  head/lib/libpam/modules/pam_ssh/Makefile
  head/libexec/atf/atf-check/Makefile
  head/libexec/atf/atf-sh/Makefile
  head/secure/lib/libssh/Makefile
  head/secure/libexec/sftp-server/Makefile
  head/secure/libexec/ssh-keysign/Makefile
  head/secure/libexec/ssh-pkcs11-helper/Makefile
  head/secure/usr.bin/scp/Makefile
  head/secure/usr.bin/sftp/Makefile
  head/secure/usr.bin/ssh-add/Makefile
  head/secure/usr.bin/ssh-agent/Makefile
  head/secure/usr.bin/ssh-keygen/Makefile
  head/secure/usr.bin/ssh-keyscan/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile
  head/share/mk/atf.test.mk
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.libnames.mk
  head/usr.bin/drill/Makefile
  head/usr.bin/host/Makefile
  head/usr.sbin/pkg/Makefile
  head/usr.sbin/unbound/anchor/Makefile
  head/usr.sbin/unbound/checkconf/Makefile
  head/usr.sbin/unbound/control/Makefile
  head/usr.sbin/unbound/daemon/Makefile

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/ObsoleteFiles.inc	Wed Aug  6 22:17:26 2014	(r269648)
@@ -38,6 +38,31 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20140807: Remove private lib files that should not be installed.
+OLD_FILES+=usr/lib/private/libatf-c.a
+OLD_FILES+=usr/lib/private/libatf-c.so
+OLD_FILES+=usr/lib/private/libatf-c_p.a
+OLD_FILES+=usr/lib/private/libatf-c++.a
+OLD_FILES+=usr/lib/private/libatf-c++.so
+OLD_FILES+=usr/lib/private/libatf-c++_p.a
+OLD_FILES+=usr/lib/private/libheimipcc.a
+OLD_FILES+=usr/lib/private/libheimipcc.so
+OLD_FILES+=usr/lib/private/libheimipcc_p.a
+OLD_FILES+=usr/lib/private/libheimipcs.a
+OLD_FILES+=usr/lib/private/libheimipcs.so
+OLD_FILES+=usr/lib/private/libheimipcs_p.a
+OLD_FILES+=usr/lib/private/libldns.a
+OLD_FILES+=usr/lib/private/libldns.so
+OLD_FILES+=usr/lib/private/libldns_p.a
+OLD_FILES+=usr/lib/private/libssh.a
+OLD_FILES+=usr/lib/private/libssh.so
+OLD_FILES+=usr/lib/private/libssh.p.a
+OLD_FILES+=usr/lib/private/libunbound.a
+OLD_FILES+=usr/lib/private/libunbound.so
+OLD_FILES+=usr/lib/private/libunbound_p.a
+OLD_FILES+=usr/lib/private/libucl.a
+OLD_FILES+=usr/lib/private/libucl.so
+OLD_FILES+=usr/lib/private/libucl_p.a
 # 20140803: Remove an obsolete man page
 OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz
 # 20140728: libsbuf restored to old version.

Modified: head/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- head/gnu/usr.bin/gdb/Makefile.inc	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/gnu/usr.bin/gdb/Makefile.inc	Wed Aug  6 22:17:26 2014	(r269648)
@@ -16,7 +16,6 @@ OBJ_ROOT= ${.OBJDIR}/../..
 OBJ_BU= ${OBJ_ROOT}/binutils
 OBJ_GDB= ${OBJ_ROOT}/gdb
 OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/readline
-LIBREADLINE=	${OBJ_ROOT}/../lib/libreadline/readline/libreadline.a
 
 # These assignments duplicate much of the functionality of
 # MACHINE_CPUARCH, but there's no easy way to export make functions...

Modified: head/gnu/usr.bin/gdb/gdb/Makefile
==============================================================================
--- head/gnu/usr.bin/gdb/gdb/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/gnu/usr.bin/gdb/gdb/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -12,7 +12,7 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
 LDFLAGS+= -Wl,-E
 
 DPADD=	${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
-LDADD=	${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcapw -lgnuregex
+LDADD=	${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex
 
 NO_PIE=	yes
 

Modified: head/gnu/usr.bin/gdb/gdbtui/Makefile
==============================================================================
--- head/gnu/usr.bin/gdb/gdbtui/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/gnu/usr.bin/gdb/gdbtui/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -13,7 +13,7 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
 LDFLAGS+= -Wl,-E
 
 DPADD=	${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
-LDADD=	${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcapw -lgnuregex
+LDADD=	${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex
 
 NO_PIE=	yes
 

Modified: head/gnu/usr.bin/gdb/kgdb/Makefile
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/gnu/usr.bin/gdb/kgdb/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -10,7 +10,7 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
 
 DPADD=	${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} \
 	${LIBGNUREGEX}
-LDADD=	${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LIBREADLINE} -ltermcapw \
+LDADD=	${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LDREADLINE} -ltermcapw \
 	-lgnuregex
 
 .if defined(GDB_CROSS_DEBUGGER)

Modified: head/kerberos5/lib/libkrb5/Makefile
==============================================================================
--- head/kerberos5/lib/libkrb5/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/kerberos5/lib/libkrb5/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -3,7 +3,7 @@
 LIB=	krb5
 LDFLAGS=	-Wl,--no-undefined
 VERSION_MAP= ${KRB5DIR}/lib/krb5/version-script.map
-LDADD=	-lasn1 -lcom_err -lcrypt -lcrypto -lhx509 -lroken -lwind -lheimbase -lheimipcc
+LDADD=	-lasn1 -lcom_err -lcrypt -lcrypto -lhx509 -lroken -lwind -lheimbase ${LDHEIMIPCC}
 DPADD=	${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} ${LIBHX509} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC}
 USEPRIVATELIB= heimipcc
 

Modified: head/kerberos5/libexec/digest-service/Makefile
==============================================================================
--- head/kerberos5/libexec/digest-service/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/kerberos5/libexec/digest-service/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -10,7 +10,7 @@ CFLAGS+=	-I${KRB5DIR}/kdc \
 		-I${KRB5DIR}/lib/roken
 DPADD=	${LIBHDB} ${LIBKDC} ${LIBHEIMIPCS} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \
 	${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS}
-LDADD=	-lhdb -lkdc -lheimipcs -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \
+LDADD=	-lhdb -lkdc ${LDHEIMIPCS} -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \
 	${LIBVERS} -lheimntlm
 USEPRIVATELIB= heimipcs
 

Modified: head/kerberos5/libexec/kcm/Makefile
==============================================================================
--- head/kerberos5/libexec/kcm/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/kerberos5/libexec/kcm/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -21,7 +21,7 @@ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DI
 	-I${KRB5DIR}/kcm -I${KRB5DIR}/lib/ipc ${LDAPCFLAGS}
 DPADD=	${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBHEIMNTLM} \
 	${LIBHEIMIPCS} ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} ${LDAPDPADD}
-LDADD=	-lhdb -lkrb5 -lroken -lasn1 -lheimntlm -lheimipcs \
+LDADD=	-lhdb -lkrb5 -lroken -lasn1 -lheimntlm ${LDHEIMIPCS} \
 	-lcrypto -lcrypt ${LIBVERS} ${LDAPLDADD}
 USEPRIVATELIB= heimipcs
 LDFLAGS=${LDAPLDFLAGS}

Modified: head/lib/libpam/modules/pam_ssh/Makefile
==============================================================================
--- head/lib/libpam/modules/pam_ssh/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/lib/libpam/modules/pam_ssh/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -14,7 +14,7 @@ WARNS?=	3
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
 
 DPADD=	${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
-LDADD=	-lssh -lcrypto -lcrypt
+LDADD=	${LDSSH} -lcrypto -lcrypt
 USEPRIVATELIB= ssh
 
 .include <bsd.lib.mk>

Modified: head/libexec/atf/atf-check/Makefile
==============================================================================
--- head/libexec/atf/atf-check/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/libexec/atf/atf-check/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -37,10 +37,8 @@ MAN=		atf-check.1
 
 CFLAGS+=	-I${ATF}
 
-LDFLAGS+=	-L${.OBJDIR}/../../../lib/atf/libatf-c++
-LDFLAGS+=	-L${.OBJDIR}/../../../lib/atf/libatf-c
 DPADD+=		${LIBATF_CXX} ${LIBATF_C}
-LDADD+=		-latf-c++ -latf-c
+LDADD+=		${LDATF_CXX} ${LDATF_C}
 USEPRIVATELIB=	atf-c++ atf-c
 
 .if ${MK_TESTS} != "no"

Modified: head/libexec/atf/atf-sh/Makefile
==============================================================================
--- head/libexec/atf/atf-sh/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/libexec/atf/atf-sh/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -39,7 +39,7 @@ CFLAGS+=	-DHAVE_CONFIG_H
 CFLAGS+=	-I${ATF}
 
 DPADD+=		${LIBATF_C} ${LIBATF_CXX}
-LDADD+=		-latf-c++ -latf-c
+LDADD+=		${LDATF_C} ${LDATF_CXX}
 USEPRIVATELIB=	atf-c++ atf-c
 
 FILESGROUPS=	SUBR

Modified: head/secure/lib/libssh/Makefile
==============================================================================
--- head/secure/lib/libssh/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/lib/libssh/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -35,7 +35,7 @@ LDNSDIR=	${.CURDIR}/../../../contrib/ldn
 CFLAGS+=	-DHAVE_LDNS=1 -I${LDNSDIR}
 SRCS+=	getrrsetbyname-ldns.c
 DPADD+=	${LIBLDNS}
-LDADD+=	-lldns
+LDADD+=	${LDLDNS}
 USEPRIVATELIB+= ldns
 .endif
 

Modified: head/secure/libexec/sftp-server/Makefile
==============================================================================
--- head/secure/libexec/sftp-server/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/libexec/sftp-server/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -13,7 +13,7 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH}
-LDADD=  -lssh
+LDADD=  ${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/libexec/ssh-keysign/Makefile
==============================================================================
--- head/secure/libexec/ssh-keysign/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/libexec/ssh-keysign/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -9,7 +9,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa
 BINMODE=4555
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/libexec/ssh-pkcs11-helper/Makefile
==============================================================================
--- head/secure/libexec/ssh-pkcs11-helper/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/libexec/ssh-pkcs11-helper/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -13,7 +13,7 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/usr.bin/scp/Makefile
==============================================================================
--- head/secure/usr.bin/scp/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/scp/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -12,7 +12,7 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/usr.bin/sftp/Makefile
==============================================================================
--- head/secure/usr.bin/sftp/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/sftp/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -12,7 +12,7 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH} ${LIBEDIT} ${LIBNCURSESW}
-LDADD=	-lssh -ledit -lncursesw
+LDADD=	${LDSSH} -ledit -lncursesw
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/usr.bin/ssh-add/Makefile
==============================================================================
--- head/secure/usr.bin/ssh-add/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/ssh-add/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -12,7 +12,7 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/usr.bin/ssh-agent/Makefile
==============================================================================
--- head/secure/usr.bin/ssh-agent/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/ssh-agent/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -12,7 +12,7 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/usr.bin/ssh-keygen/Makefile
==============================================================================
--- head/secure/usr.bin/ssh-keygen/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/ssh-keygen/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -12,13 +12,13 @@ SRCS+=	roaming_dummy.c
 .endif
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"
 CFLAGS+=	-DHAVE_LDNS=1
 DPADD+=	${LIBLDNS}
-LDADD+=	-lldns
+LDADD+=	${LDLDNS}
 USEPRIVATELIB+= ldns
 .endif
 

Modified: head/secure/usr.bin/ssh-keyscan/Makefile
==============================================================================
--- head/secure/usr.bin/ssh-keyscan/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/ssh-keyscan/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -7,7 +7,7 @@ SRCS=	ssh-keyscan.c roaming_dummy.c
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
 
 DPADD=	${LIBSSH}
-LDADD=	-lssh
+LDADD=	${LDSSH}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"

Modified: head/secure/usr.bin/ssh/Makefile
==============================================================================
--- head/secure/usr.bin/ssh/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.bin/ssh/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -16,13 +16,13 @@ SRCS=	ssh.c readconf.c clientloop.c ssht
 SRCS+=	gss-genr.c
 
 DPADD=	${LIBSSH} ${LIBUTIL}
-LDADD=	-lssh -lutil
+LDADD=	${LDSSH} -lutil
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"
 CFLAGS+=	-DHAVE_LDNS=1
 DPADD+=	${LIBLDNS}
-LDADD+=	-lldns
+LDADD+=	${LIBLDNSADD}
 USEPRIVATELIB+= ldns
 .endif
 

Modified: head/secure/usr.sbin/sshd/Makefile
==============================================================================
--- head/secure/usr.sbin/sshd/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/secure/usr.sbin/sshd/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -26,7 +26,7 @@ MAN=	sshd.8 sshd_config.5
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
 
 DPADD=	${LIBSSH} ${LIBUTIL} ${LIBWRAP} ${LIBPAM}
-LDADD=	-lssh -lutil -lwrap ${MINUSLPAM}
+LDADD=	${LDSSH} -lutil -lwrap ${MINUSLPAM}
 USEPRIVATELIB= ssh
 
 .if ${MK_LDNS} != "no"
@@ -47,7 +47,7 @@ CFLAGS+= -include krb5_config.h
 DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \
 	${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC}
 LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \
-	-lcom_err -lroken -lwind -lheimbase -lheimipcc
+	-lcom_err -lroken -lwind -lheimbase ${LDHEIMIPCC}
 .endif
 
 .if ${MK_OPENSSH_NONE_CIPHER} != "no"

Modified: head/share/mk/atf.test.mk
==============================================================================
--- head/share/mk/atf.test.mk	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/share/mk/atf.test.mk	Wed Aug  6 22:17:26 2014	(r269648)
@@ -71,7 +71,7 @@ BINDIR.${_T}= ${TESTSDIR}
 MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}.c
 DPADD.${_T}+= ${LIBATF_C}
-LDADD.${_T}+= -latf-c
+LDADD.${_T}+= ${LDATF_C}
 USEPRIVATELIB+= atf-c
 TEST_INTERFACE.${_T}= atf
 .endfor
@@ -85,7 +85,7 @@ BINDIR.${_T}= ${TESTSDIR}
 MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc}
 DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C}
-LDADD.${_T}+= -latf-c++ -latf-c
+LDADD.${_T}+= ${LDATF_CXX} ${LDATF_C}
 USEPRIVATELIB+= atf-c++
 TEST_INTERFACE.${_T}= atf
 .endfor

Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/share/mk/bsd.lib.mk	Wed Aug  6 22:17:26 2014	(r269648)
@@ -155,7 +155,7 @@ LDFLAGS+=	-Wl,--version-script=${VERSION
 .endif
 
 .if defined(USEPRIVATELIB)
-LDFLAGS+= -L${_SHLIBDIRPREFIX}${LIBPRIVATEDIR} -rpath ${LIBPRIVATEDIR}
+LDFLAGS+= -rpath ${LIBPRIVATEDIR}
 .endif
 
 .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
@@ -306,11 +306,11 @@ _SHLINSTALLFLAGS:=	${_SHLINSTALLFLAGS${i
 realinstall: _libinstall
 .ORDER: beforeinstall _libinstall
 _libinstall:
-.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
+.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" && !defined(PRIVATELIB)
 	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${_LIBDIR}
 .endif
-.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
+.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) && !defined(PRIVATELIB)
 	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${_LIBDIR}
 .endif
@@ -326,7 +326,7 @@ _libinstall:
 	    ${_INSTALLFLAGS} \
 	    ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}
 .endif
-.if defined(SHLIB_LINK)
+.if defined(SHLIB_LINK) && !defined(PRIVATELIB)
 # ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building
 # and when building 32 bits library shims.  ${_SHLIBDIRPREFIX} is the directory
 # prefix where shared objects will be installed by the install target.
@@ -367,7 +367,7 @@ _libinstall:
 .endif # SHLIB_LDSCRIPT
 .endif # SHLIB_LINK
 .endif # SHIB_NAME
-.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
+.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" && !defined(PRIVATELIB)
 	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}
 .endif

Modified: head/share/mk/bsd.libnames.mk
==============================================================================
--- head/share/mk/bsd.libnames.mk	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/share/mk/bsd.libnames.mk	Wed Aug  6 22:17:26 2014	(r269648)
@@ -8,13 +8,13 @@
 .error bsd.libnames.mk cannot be included directly.
 .endif
 
+.sinclude <src.libnames.mk>
+
 LIBCRT0?=	${DESTDIR}${LIBDIR}/crt0.o
 
 LIBALIAS?=	${DESTDIR}${LIBDIR}/libalias.a
 LIBARCHIVE?=	${DESTDIR}${LIBDIR}/libarchive.a
 LIBASN1?=	${DESTDIR}${LIBDIR}/libasn1.a
-LIBATF_C?=	${DESTDIR}${LIBPRIVATEDIR}/libatf-c.a
-LIBATF_CXX?=	${DESTDIR}${LIBPRIVATEDIR}/libatf-c++.a
 LIBATM?=	${DESTDIR}${LIBDIR}/libatm.a
 LIBAUDITD?=	${DESTDIR}${LIBDIR}/libauditd.a
 LIBAVL?=	${DESTDIR}${LIBDIR}/libavl.a
@@ -58,8 +58,6 @@ LIBGSSAPI?=	${DESTDIR}${LIBDIR}/libgssap
 LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR}/libgssapi_krb5.a
 LIBHDB?=	${DESTDIR}${LIBDIR}/libhdb.a
 LIBHEIMBASE?=	${DESTDIR}${LIBDIR}/libheimbase.a
-LIBHEIMIPCC?=	${DESTDIR}${LIBPRIVATEDIR}/libheimipcc.a
-LIBHEIMIPCS?=	${DESTDIR}${LIBPRIVATEDIR}/libheimipcs.a
 LIBHEIMNTLM?=	${DESTDIR}${LIBDIR}/libheimntlm.a
 LIBHEIMSQLITE?=	${DESTDIR}${LIBDIR}/libheimsqlite.a
 LIBHX509?=	${DESTDIR}${LIBDIR}/libhx509.a
@@ -74,7 +72,6 @@ LIBKICONV?=	${DESTDIR}${LIBDIR}/libkicon
 LIBKRB5?=	${DESTDIR}${LIBDIR}/libkrb5.a
 LIBKVM?=	${DESTDIR}${LIBDIR}/libkvm.a
 LIBL?=		${DESTDIR}${LIBDIR}/libl.a
-LIBLDNS?=	${DESTDIR}${LIBPRIVATEDIR}/libldns.a
 LIBLN?=		"don't use LIBLN, use LIBL"
 LIBLZMA?=	${DESTDIR}${LIBDIR}/liblzma.a
 LIBM?=		${DESTDIR}${LIBDIR}/libm.a
@@ -134,7 +131,6 @@ LIBRTLD_DB?=	${DESTDIR}${LIBDIR}/librtld
 LIBSBUF?=	${DESTDIR}${LIBDIR}/libsbuf.a
 LIBSDP?=	${DESTDIR}${LIBDIR}/libsdp.a
 LIBSMB?=	${DESTDIR}${LIBDIR}/libsmb.a
-LIBSSH?=	${DESTDIR}${LIBPRIVATEDIR}/libssh.a
 LIBSSL?=	${DESTDIR}${LIBDIR}/libssl.a
 LIBSTAND?=	${DESTDIR}${LIBDIR}/libstand.a
 LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a
@@ -142,11 +138,9 @@ LIBTACPLUS?=	${DESTDIR}${LIBDIR}/libtacp
 LIBTERMCAP?=	${DESTDIR}${LIBDIR}/libtermcap.a
 LIBTERMLIB?=	"don't use LIBTERMLIB, use LIBTERMCAP"
 LIBTINFO?=	"don't use LIBTINFO, use LIBNCURSES"
-LIBUCL?=	${DESTDIR}${LIBPRIVATEDIR}/libucl.a
 LIBUFS?=	${DESTDIR}${LIBDIR}/libufs.a
 LIBUGIDFW?=	${DESTDIR}${LIBDIR}/libugidfw.a
 LIBUMEM?=	${DESTDIR}${LIBDIR}/libumem.a
-LIBUNBOUND?=	${DESTDIR}${LIBPRIVATEDIR}/libunbound.a
 LIBUSBHID?=	${DESTDIR}${LIBDIR}/libusbhid.a
 LIBUSB?=	${DESTDIR}${LIBDIR}/libusb.a
 LIBULOG?=	${DESTDIR}${LIBDIR}/libulog.a

Added: head/share/mk/src.libnames.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/mk/src.libnames.mk	Wed Aug  6 22:17:26 2014	(r269648)
@@ -0,0 +1,46 @@
+# $FreeBSD$
+#
+# The include file <src.libnames.mk> define library names suitable
+# for INTERNALLIB and PRIVATELIB definition
+
+.if !target(__<bsd.init.mk>__)
+.error src.libnames.mk cannot be included directly.
+.endif
+
+ROOTOBJDIR=	${.OBJDIR:S/${.CURDIR}//}${.MAKE.MAKEFILES:M*/src.libnames.mk:H:H:H}
+
+LIBATF_CDIR=	${ROOTOBJDIR}/lib/atf/libatf-c
+LDATF_C?=	${LIBATF_CDIR}/libatf-c.so
+LIBATF_C?=	${LIBATF_CDIR}/libatf-c.a
+
+LIBATF_CXXDIR=	${ROOTOBJDIR}/lib/atf/libatf-c++
+LDATF_CXX?=	${LIBATF_CXXDIR}/libatf-c++.so
+LIBATF_CXX?=	${LIBATF_CXXDIR}/libatf-c++.a
+
+LIBHEIMIPCCDIR=	${ROOTOBJDIR}/kerberos5/lib/libheimipcc
+LDHEIMIPCC?=	${LIBHEIMIPCCDIR}/libheimipcc.so
+LIBHEIMIPCC?=	${LIBHEIMIPCCDIR}/libheimipcc.a
+
+LIBHEIMIPCSDIR=	${ROOTOBJDIR}/kerberos5/lib/libheimipcs
+LDHEIMIPCS?=	${LIBHEIMIPCSDIR}/libheimipcs.so
+LIBHEIMIPCS?=	${LIBHEIMIPCSDIR}/libheimipcs.a
+
+LIBLDNSDIR=	${ROOTOBJDIR}/lib/libldns
+LDLDNS?=	${LIBLDNSDIR}/libldns.so
+LIBLDNS?=	${LIBLDNSDIR}/libldns.a
+
+LIBSSHDIR=	${ROOTOBJDIR}/secure/lib/libssh
+LDSSH?=		${LIBSSHDIR}/libssh.so
+LIBSSH?=	${LIBSSHDIR}/libssh.a
+
+LIBUNBOUNDDIR=	${ROOTOBJDIR}/lib/libunbound
+LDUNBOUND?=	${LIBUNBOUNDDIR}/libunbound.so
+LIBUNBOUND?=	${LIBUNBOUNDDIR}/libunbound.a
+
+LIBUCLDIR=	${ROOTOBJDIR}/lib/libucl
+LDUCL?=		${LIBUCLDIR}/libucl.so
+LIBUCL?=	${LIBUCLDIR}/libucl.a
+
+LIBREADLINEDIR=	${ROOTOBJDIR}/gnu/lib/libreadline/readline
+LDREADLINE?=	${LIBREADLINEDIR}/libreadline.a
+LIBREADLINE?=	${LIBREADLINEDIR}/libreadline.a

Modified: head/usr.bin/drill/Makefile
==============================================================================
--- head/usr.bin/drill/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.bin/drill/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -13,7 +13,7 @@ NO_WERROR= true
 MAN=	drill.1
 
 DPADD+=	${LIBLDNS} ${LIBCRYPTO}
-LDADD+=	-lldns -lcrypto
+LDADD+=	${LDLDNS} -lcrypto
 USEPRIVATELIB= ldns
 
 .include <bsd.prog.mk>

Modified: head/usr.bin/host/Makefile
==============================================================================
--- head/usr.bin/host/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.bin/host/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -15,7 +15,7 @@ host.1: ldns-host.1
 
 CFLAGS+=	-I${LDNSDIR}
 DPADD+=		${LIBLDNS} ${LIBCRYPTO}
-LDADD+=		-lldns -lcrypto
+LDADD+=		${LDLDNS} -lcrypto
 USEPRIVATELIB=	ldns
 
 .include <bsd.prog.mk>

Modified: head/usr.sbin/pkg/Makefile
==============================================================================
--- head/usr.sbin/pkg/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.sbin/pkg/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -8,7 +8,7 @@ CFLAGS+=-I${.CURDIR}/../../contrib/libuc
 .PATH:	${.CURDIR}/../../contrib/libucl/include
 DPADD=	${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBUCL} ${LIBSBUF} ${LIBSSL} \
 	${LIBCRYPTO} ${LIBM}
-LDADD=	-larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto -lm
+LDADD=	-larchive -lelf -lfetch ${LDUCL} -lsbuf -lssl -lcrypto -lm
 USEPRIVATELIB=	ucl
 
 .include <bsd.prog.mk>

Modified: head/usr.sbin/unbound/anchor/Makefile
==============================================================================
--- head/usr.sbin/unbound/anchor/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.sbin/unbound/anchor/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -11,7 +11,7 @@ PROG=	unbound-anchor
 SRCS=	unbound-anchor.c
 CFLAGS=	-I${UNBOUNDDIR} -I${LDNSDIR} -I${EXPATDIR}/lib
 DPADD=	${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBBSDXML} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD=	-lunbound -lldns -lutil -lbsdxml -lssl -lcrypto -lpthread
+LDADD=	${LDUNBOUND} ${LDLDNS} -lutil -lbsdxml -lssl -lcrypto -lpthread
 USEPRIVATELIB=	ldns
 MAN=	unbound-anchor.8
 

Modified: head/usr.sbin/unbound/checkconf/Makefile
==============================================================================
--- head/usr.sbin/unbound/checkconf/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.sbin/unbound/checkconf/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -10,7 +10,7 @@ PROG=	unbound-checkconf
 SRCS=	unbound-checkconf.c worker_cb.c
 CFLAGS=	-I${UNBOUNDDIR} -I${LDNSDIR}
 DPADD=	${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD=	-lunbound -lldns -lutil -lssl -lcrypto -lpthread
+LDADD=	${LDUNBOUND} ${LDLDNS} -lutil -lssl -lcrypto -lpthread
 USEPRIVATELIB=	ldns
 MAN=	unbound-checkconf.8
 

Modified: head/usr.sbin/unbound/control/Makefile
==============================================================================
--- head/usr.sbin/unbound/control/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.sbin/unbound/control/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -11,7 +11,7 @@ SCRIPTS=	unbound-control-setup.sh
 SRCS=	unbound-control.c worker_cb.c
 CFLAGS=	-I${UNBOUNDDIR} -I${LDNSDIR}
 DPADD=	${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD=	-lunbound -lldns -lutil -lssl -lcrypto -lpthread
+LDADD=	${LDUNBOUND} ${LDLDNS} -lutil -lssl -lcrypto -lpthread
 USEPRIVATELIB=	ldns
 MAN=	unbound-control.8
 

Modified: head/usr.sbin/unbound/daemon/Makefile
==============================================================================
--- head/usr.sbin/unbound/daemon/Makefile	Wed Aug  6 22:15:01 2014	(r269647)
+++ head/usr.sbin/unbound/daemon/Makefile	Wed Aug  6 22:17:26 2014	(r269648)
@@ -10,7 +10,7 @@ PROG=	unbound
 SRCS=	acl_list.c cachedump.c daemon.c remote.c stats.c unbound.c worker.c
 CFLAGS=	-I${UNBOUNDDIR} -I${LDNSDIR}
 DPADD=	${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD=	-lunbound -lldns -lutil -lssl -lcrypto -lpthread
+LDADD=	${LDUNBOUND} ${LDLDNS} -lutil -lssl -lcrypto -lpthread
 USEPRIVATELIB=	ldns
 MAN=	unbound.8 unbound.conf.5
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e2a976.53a9.7276309d>