Index: ObsoleteFiles.inc =================================================================== --- ObsoleteFiles.inc +++ ObsoleteFiles.inc @@ -38,6 +38,41 @@ # xargs -n1 | sort | uniq -d; # done +# 20150425 +OLD_LIBS+=usr/lib32/private/libatf-c++.so.2 +OLD_LIBS+=usr/lib32/private/libbsdstat.so.1 +OLD_LIBS+=usr/lib32/private/libheimipcs.so.11 +OLD_LIBS+=usr/lib32/private/libsqlite3.so.0 +OLD_LIBS+=usr/lib32/private/libunbound.so.5 +OLD_LIBS+=usr/lib32/private/libatf-c.so.1 +OLD_LIBS+=usr/lib32/private/libheimipcc.so.11 +OLD_LIBS+=usr/lib32/private/libldns.so.5 +OLD_LIBS+=usr/lib32/private/libssh.so.5 +OLD_LIBS+=usr/lib32/private/libucl.so.1 +OLD_DIRS+=usr/lib32/private +OLD_LIBS+=usr/lib/private/libatf-c++.so.2 +OLD_LIBS+=usr/lib/private/libbsdstat.so.1 +OLD_LIBS+=usr/lib/private/libheimipcs.so.11 +OLD_LIBS+=usr/lib/private/libsqlite3.so.0 +OLD_LIBS+=usr/lib/private/libunbound.so.5 +OLD_LIBS+=usr/lib/private/libatf-c.so.1 +OLD_LIBS+=usr/lib/private/libheimipcc.so.11 +OLD_LIBS+=usr/lib/private/libldns.so.5 +OLD_LIBS+=usr/lib/private/libssh.so.5 +OLD_LIBS+=usr/lib/private/libucl.so.1 +OLD_DIRS+=usr/lib/private +# 20150418 +OLD_LIBS+=usr/lib/private/libatf-c++.so.2 +OLD_LIBS+=usr/lib/private/libbsdstat.so.1 +OLD_LIBS+=usr/lib/private/libheimipcs.so.11 +OLD_LIBS+=usr/lib/private/libsqlite3.so.0 +OLD_LIBS+=usr/lib/private/libunbound.so.5 +OLD_LIBS+=usr/lib/private/libatf-c.so.1 +OLD_LIBS+=usr/lib/private/libheimipcc.so.11 +OLD_LIBS+=usr/lib/private/libldns.so.5 +OLD_LIBS+=usr/lib/private/libssh.so.5 +OLD_LIBS+=usr/lib/private/libucl.so.1 +OLD_DIRS+=usr/lib/private # 20150418 OLD_FILES+=sbin/mount_oldnfs OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz Index: etc/mtree/BSD.usr.dist =================================================================== --- etc/mtree/BSD.usr.dist +++ etc/mtree/BSD.usr.dist @@ -8,6 +8,10 @@ bin .. include + private + ucl + .. + .. .. lib aout @@ -32,16 +36,12 @@ .. i18n .. - private - .. .. lib32 dtrace .. i18n .. - private - .. .. libdata gcc Index: lib/libucl/Makefile =================================================================== --- lib/libucl/Makefile +++ lib/libucl/Makefile @@ -14,8 +14,10 @@ ucl_util.c \ xxhash.c -.PATH: ${LIBUCL}/src +.PATH: ${LIBUCL}/src \ + ${LIBUCL}/include +INCS= ucl.h LIBADD= m WARNS= 1 Index: share/mk/atf.test.mk =================================================================== --- share/mk/atf.test.mk +++ share/mk/atf.test.mk @@ -76,7 +76,6 @@ .else LDADD.${_T}+= ${LIBATF_C} .endif -USEPRIVATELIB+= atf-c TEST_INTERFACE.${_T}= atf .endfor .endif Index: share/mk/bsd.incs.mk =================================================================== --- share/mk/bsd.incs.mk +++ share/mk/bsd.incs.mk @@ -23,7 +23,7 @@ ${group}OWN?= ${BINOWN} ${group}GRP?= ${BINGRP} ${group}MODE?= ${NOBINMODE} -${group}DIR?= ${INCLUDEDIR} +${group}DIR?= ${INCLUDEDIR}${PRIVATELIB:D/private/${LIB}} _${group}INCS= .for header in ${${group}} Index: share/mk/bsd.lib.mk =================================================================== --- share/mk/bsd.lib.mk +++ share/mk/bsd.lib.mk @@ -11,6 +11,7 @@ _LD= ${CC} .endif +LIB_PRIVATE= ${PRIVATELIB:Dprivate} # Set up the variables controlling shared libraries. After this section, # SHLIB_NAME will be defined only if we are to create a shared library. # SHLIB_LINK will be defined only if we are to create a link to it. @@ -23,7 +24,7 @@ SHLIB= ${LIB} .endif .if !defined(SHLIB_NAME) && defined(SHLIB) && defined(SHLIB_MAJOR) -SHLIB_NAME= lib${SHLIB}.so.${SHLIB_MAJOR} +SHLIB_NAME= lib${LIB_PRIVATE}${SHLIB}.so.${SHLIB_MAJOR} .endif .if defined(SHLIB_NAME) && !empty(SHLIB_NAME:M*.so.*) SHLIB_LINK?= ${SHLIB_NAME:R} @@ -128,13 +129,8 @@ all: beforebuild .WAIT beforebuild: objwarn -.if defined(PRIVATELIB) -_LIBDIR:=${LIBPRIVATEDIR} -_SHLIBDIR:=${LIBPRIVATEDIR} -.else _LIBDIR:=${LIBDIR} _SHLIBDIR:=${SHLIBDIR} -.endif .if defined(SHLIB_NAME) .if ${MK_DEBUG_FILES} != "no" @@ -162,19 +158,15 @@ LDFLAGS+= -Wl,--version-script=${VERSION_MAP} .endif -.if defined(USEPRIVATELIB) -LDFLAGS+= -rpath ${LIBPRIVATEDIR} -.endif - .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) OBJS+= ${SRCS:N*.h:R:S/$/.o/} NOPATH_FILES+= ${OBJS} .endif .if defined(LIB) && !empty(LIB) -_LIBS= lib${LIB}.a +_LIBS= lib${LIB_PRIVATE}${LIB}.a -lib${LIB}.a: ${OBJS} ${STATICOBJS} +lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} @@ -184,11 +176,11 @@ .if !defined(INTERNALLIB) .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) -_LIBS+= lib${LIB}_p.a +_LIBS+= lib${LIB_PRIVATE}${LIB}_p.a POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} NOPATH_FILES+= ${POBJS} -lib${LIB}_p.a: ${POBJS} +lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} @@ -243,9 +235,9 @@ .endif #defined(SHLIB_NAME) .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" -_LIBS+= lib${LIB}_pic.a +_LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a -lib${LIB}_pic.a: ${SOBJS} +lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} @${ECHO} building special pic ${LIB} library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} @@ -305,13 +297,13 @@ realinstall: _libinstall .ORDER: beforeinstall _libinstall _libinstall: -.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" && !defined(PRIVATELIB) +.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${_LIBDIR} + ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR} .endif -.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) && !defined(PRIVATELIB) +.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${_LIBDIR} + ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR} .endif .if defined(SHLIB_NAME) ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ @@ -325,7 +317,7 @@ ${_INSTALLFLAGS} \ ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR} .endif -.if defined(SHLIB_LINK) && !defined(PRIVATELIB) +.if defined(SHLIB_LINK) # ${_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. @@ -366,7 +358,7 @@ .endif # SHLIB_LDSCRIPT .endif # SHLIB_LINK .endif # SHIB_NAME -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" && !defined(PRIVATELIB) +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR} .endif Index: share/mk/bsd.prog.mk =================================================================== --- share/mk/bsd.prog.mk +++ share/mk/bsd.prog.mk @@ -51,10 +51,6 @@ LDFLAGS+= -static .endif -.if defined(USEPRIVATELIB) -LDFLAGS+= -L${_SHLIBDIRPREFIX}${LIBPRIVATEDIR} -rpath ${LIBPRIVATEDIR} -.endif - .if ${MK_DEBUG_FILES} != "no" PROG_FULL=${PROG}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory Index: share/mk/src.libnames.mk =================================================================== --- share/mk/src.libnames.mk +++ share/mk/src.libnames.mk @@ -233,18 +233,25 @@ # Define spacial cases LDADD_supcplusplus= -lsupc++ -LDADD_atf_c= -L${LIBATF_CDIR} -latf-c -LDADD_atf_cxx= -L${LIBATF_CXXDIR} -latf-c++ +DPADD_atf_c= $(DESTDIR)$(LIBDIR)/libprivateatf-c.a +DPADD_atf_cxx= $(DESTDIR)$(LIBDIR)/libprivateatf-c++.a +LDADD_atf_c= --lprivateatf-c +LDADD_atf_cxx= --lprivateatf-c++ + +.for _l in ${_PRIVATELIBS} +LIB${_l:tu}?= ${DESTDIR}${LIBDIR}/libprivate${_l}.a +.endfor .for _l in ${_LIBRARIES} -.if ${_PRIVATELIBS:M${_l}} -LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} -.endif .if ${_INTERNALIBS:M${_l}} LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} .endif DPADD_${_l}?= ${LIB${_l:tu}} +.if ${_PRIVATELIBS:M${_l}} +LDADD_${_l}?= -lprivate${_l} +.else LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} +.endif .if defined(_DP_${_l}) && defined(NO_SHARED) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} @@ -253,12 +260,12 @@ .endif .endfor -DPADD_sqlite3+= ${DPADD_pthread} -LDADD_sqlite3+= ${LDADD_pthread} - DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +DPADD_sqlite3+= ${DPADD_pthread} +LDADD_sqlite3+= ${LDADD_pthread} + DPADD_fifolog+= ${DPADD_z} LDADD_fifolog+= ${LDADD_z} @@ -294,51 +301,18 @@ LDFLAGS+= -rpath ${LIBPRIVATEDIR} .endif -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 - -LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat -LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a - LIBELFTCDIR= ${ROOTOBJDIR}/lib/libelftc -LDELFTC?= ${LIBELFTCDIR}/libelftc.a LIBELFTC?= ${LIBELFTCDIR}/libelftc.a LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent LIBEVENT?= ${LIBEVENTDIR}/libevent.a -LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc -LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a - -LIBHEIMIPCSDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcs -LIBHEIMIPCS?= ${LIBHEIMIPCSDIR}/libheimipcs.a - -LIBLDNSDIR= ${ROOTOBJDIR}/lib/libldns -LIBLDNS?= ${LIBLDNSDIR}/libldns.a - -LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh -LIBSSH?= ${LIBSSHDIR}/libssh.a - -LIBUNBOUNDDIR= ${ROOTOBJDIR}/lib/libunbound -LIBUNBOUND?= ${LIBUNBOUNDDIR}/libunbound.a - -LIBUCLDIR= ${ROOTOBJDIR}/lib/libucl -LIBUCL?= ${LIBUCLDIR}/libucl.a - LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash LIBOHASH?= ${LIBOHASHDIR}/libohash.a -LIBSQLITE3DIR= ${ROOTOBJDIR}/lib/libsqlite3 -LIBSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3.a - LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a