Remove MKPRIVATELIB from BIND libraries; move library reachover

directories and Makefiles from src/usr.sbin/bind to src/lib; make
BIND libraries build shared.  Saves about 1MB-1.5MB per installed
executable, about 5MB for a base+etc minimal installation of NetBSD.
This commit is contained in:
tls 2007-11-04 23:28:16 +00:00
parent ceaa3a4f21
commit b21c402a7b
20 changed files with 110 additions and 39 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.elf,v 1.132 2007/10/19 13:16:51 jmmv Exp $
# $NetBSD: shl.elf,v 1.133 2007/11/04 23:28:16 tls Exp $
# Note: libtermcap and libtermlib are hardlinked and share the same version.
./lib/libc.so base-sys-shlib
./lib/libc.so.12 base-sys-shlib
@ -82,6 +82,8 @@
./usr/lib/libasn1.so base-krb5-shlib kerberos
./usr/lib/libasn1.so.6 base-krb5-shlib kerberos
./usr/lib/libbfd.so.8 base-sys-shlib bfd
./usr/lib/libbind9.so base-bind-shlib
./usr/lib/libbind9.so.0 base-bind-shlib
./usr/lib/libbluetooth.so base-sys-shlib
./usr/lib/libbluetooth.so.3 base-sys-shlib
./usr/lib/libbsdmalloc.so base-sys-shlib
@ -102,6 +104,8 @@
./usr/lib/libcurses.so.6 base-sys-shlib
./usr/lib/libdes.so base-crypto-shlib crypto
./usr/lib/libdes.so.7 base-crypto-shlib crypto
./usr/lib/libdns.so base-bind-shlib
./usr/lib/libdns.so.0 base-bind-shlib
./usr/lib/libedit.so base-sys-shlib
./usr/lib/libedit.so.2 base-sys-shlib
./usr/lib/libevent.so base-sys-shlib
@ -122,6 +126,12 @@
./usr/lib/libintl.so.0 base-sys-shlib
./usr/lib/libipsec.so base-net-shlib
./usr/lib/libipsec.so.2 base-net-shlib
./usr/lib/libisc.so base-bind-shlib
./usr/lib/libisc.so.0 base-bind-shlib
./usr/lib/libisccc.so base-bind-shlib
./usr/lib/libisccc.so.0 base-bind-shlib
./usr/lib/libisccfg.so base-bind-shlib
./usr/lib/libisccfg.so.0 base-bind-shlib
./usr/lib/libiscsi.so base-iscsi-shlib iscsi
./usr/lib/libiscsi.so.0 base-iscsi-shlib iscsi
./usr/lib/libkadm.so base-obsolete obsolete
@ -142,6 +152,8 @@
./usr/lib/libkstream.so.2 base-obsolete obsolete
./usr/lib/libkvm.so base-sys-shlib
./usr/lib/libkvm.so.5 base-sys-shlib
./usr/lib/liblwres.so base-bind-shlib
./usr/lib/liblwres.so.0 base-bind-shlib
./usr/lib/libm.so base-sys-shlib
./usr/lib/libm.so.0 base-sys-shlib
./usr/lib/libmagic.so base-sys-shlib

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.mi,v 1.403 2007/10/19 13:16:51 jmmv Exp $
# $NetBSD: shl.mi,v 1.404 2007/11/04 23:28:16 tls Exp $
# Note: libtermcap and libtermlib are hardlinked and share the same version.
./lib/libc.so.12.153 base-sys-shlib
./lib/libcrypt.so.0.2 base-sys-shlib
@ -42,6 +42,7 @@
./usr/lib/libarchive.so.2.0 base-sys-shlib
./usr/lib/libasn1.so.6.1 base-krb5-shlib kerberos
./usr/lib/libbfd.so.8.0 base-sys-shlib bfd
./usr/lib/libbind9.so.0.0 base-bind-shlib
./usr/lib/libbluetooth.so.3.0 base-sys-shlib
./usr/lib/libbsdmalloc.so.0.0 base-sys-shlib
./usr/lib/libbz2.so.1.0 base-sys-shlib
@ -52,6 +53,7 @@
./usr/lib/libcrypto.so.3.2 base-crypto-shlib crypto
./usr/lib/libcurses.so.6.2 base-sys-shlib
./usr/lib/libdes.so.7.0 base-crypto-shlib crypto
./usr/lib/libdns.so.0.0 base-bind-shlib
./usr/lib/libedit.so.2.10 base-sys-shlib
./usr/lib/libevent.so.1.0 base-sys-shlib
./usr/lib/libform.so.5.0 base-sys-shlib
@ -62,6 +64,9 @@
./usr/lib/libhdb.so.9.0 base-krb5-shlib kerberos
./usr/lib/libintl.so.0.0 base-sys-shlib
./usr/lib/libipsec.so.2.2 base-net-shlib
./usr/lib/libisc.so.0.0 base-bind-shlib
./usr/lib/libisccc.so.0.0 base-bind-shlib
./usr/lib/libisccfg.so.0.0 base-bind-shlib
./usr/lib/libiscsi.so.0.0 base-iscsi-shlib iscsi
./usr/lib/libkadm.so.5.0 base-obsolete obsolete
./usr/lib/libkadm5clnt.so.8.0 base-krb5-shlib kerberos
@ -74,6 +79,7 @@
./usr/lib/libkrb5.so.20.1 base-krb5-shlib kerberos
./usr/lib/libkstream.so.2.0 base-obsolete obsolete
./usr/lib/libkvm.so.5.2 base-sys-shlib
./usr/lib/liblwres.so.0.0 base-bind-shlib
./usr/lib/libm.so.0.6 base-sys-shlib
./usr/lib/libmagic.so.1.0 base-sys-shlib
./usr/lib/libmenu.so.5.0 base-sys-shlib

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1075 2007/11/02 21:26:55 christos Exp $
# $NetBSD: mi,v 1.1076 2007/11/04 23:28:16 tls Exp $
./etc/mtree/set.comp comp-sys-root
./usr/bin/addr2line comp-debug-bin bfd
./usr/bin/ar comp-util-bin bfd
@ -2070,6 +2070,8 @@
./usr/lib/libasn1.a comp-krb5-lib kerberos
./usr/lib/libasn1_p.a comp-krb5-proflib kerberos,profile
./usr/lib/libbfd.a comp-obsolete obsolete
./usr/lib/libbind9.a comp-bind-lib
./usr/lib/libbind9_p.a comp-bind-proflib profile
./usr/lib/libbluetooth.a comp-c-lib
./usr/lib/libbluetooth_p.a comp-c-proflib profile
./usr/lib/libbsdmalloc.a comp-c-lib
@ -2098,6 +2100,8 @@
./usr/lib/libcurses_p.a comp-c-proflib profile
./usr/lib/libdes.a comp-c-lib crypto
./usr/lib/libdes_p.a comp-c-proflib profile,crypto
./usr/lib/libdns.a comp-bind-lib
./usr/lib/libdns_p.a comp-bind-proflib profile
./usr/lib/libedit.a comp-c-lib
./usr/lib/libedit_p.a comp-c-proflib profile
./usr/lib/libevent.a comp-c-lib
@ -2128,6 +2132,12 @@
./usr/lib/libintl_p.a comp-c-proflib profile
./usr/lib/libipsec.a comp-c-lib
./usr/lib/libipsec_p.a comp-c-proflib profile
./usr/lib/libisc.a comp-bind-lib
./usr/lib/libisc_p.a comp-bind-lib profile
./usr/lib/libisccc.a comp-bind-lib
./usr/lib/libisccc_p.a comp-bind-profilb profile
./usr/lib/libisccfg.a comp-bind-lib
./usr/lib/libisccfg_p.a comp-bind-profilb profile
./usr/lib/libiscsi.a comp-iscsi-lib iscsi
./usr/lib/libiscsi_p.a comp-iscsi-proflib profile,iscsi
./usr/lib/libkadm.a comp-obsolete obsolete
@ -2150,6 +2160,8 @@
./usr/lib/libkvm_p.a comp-c-proflib profile
./usr/lib/libl.a comp-c-lib
./usr/lib/libl_p.a comp-c-proflib profile
./usr/lib/liblwres.a comp-bind-lib
./usr/lib/liblwres_p.a comp-bind-profilb profile
./usr/lib/libm.a comp-c-lib
./usr/lib/libm_p.a comp-c-proflib profile
./usr/lib/libmagic.a comp-c-lib
@ -3045,6 +3057,7 @@
./usr/libdata/debug/usr/sbin/zdump.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/zic.debug comp-sysutil-debug debug
./usr/libdata/lint/llib-larchive.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lbind9.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-lbluetooth.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lbsdmalloc.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lbz2.ln comp-c-lintlib lint
@ -3057,15 +3070,20 @@
./usr/libdata/lint/llib-lcrypto_rc5.ln comp-c-lintlib lint,crypto_rc5
./usr/libdata/lint/llib-lcurses.ln comp-c-lintlib lint
./usr/libdata/lint/llib-ldes.ln comp-c-lintlib lint,crypto
./usr/libdata/lint/llib-ldns.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-ledit.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lform.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lgnumalloc.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lintl.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lipsec.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lisc.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-lisccc.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-lisccfg.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-liscsi.ln comp-c-lintlib lint,iscsi
./usr/libdata/lint/llib-lkstream.ln comp-c-lintlib obsolete
./usr/libdata/lint/llib-lkvm.ln comp-c-lintlib lint
./usr/libdata/lint/llib-ll.ln comp-c-lintlib lint
./usr/libdata/lint/llib-llwres.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-lmagic.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lmenu.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lmilter.ln comp-obsolete obsolete

View File

@ -1,7 +1,8 @@
# $NetBSD: shl.mi,v 1.58 2007/07/29 17:06:01 joerg Exp $
# $NetBSD: shl.mi,v 1.59 2007/11/04 23:28:17 tls Exp $
./usr/lib/crtbeginT.o comp-c-lib
./usr/lib/libarchive_pic.a comp-c-piclib
./usr/lib/libasn1_pic.a comp-c-piclib kerberos
./usr/lib/libbind9_pic.a comp-bind-piclib
./usr/lib/libbluetooth_pic.a comp-c-piclib
./usr/lib/libbsdmalloc_pic.a comp-c-piclib
./usr/lib/libbz2_pic.a comp-c-piclib
@ -13,6 +14,7 @@
./usr/lib/libcrypto_pic.a comp-c-piclib crypto
./usr/lib/libcurses_pic.a comp-c-piclib
./usr/lib/libdes_pic.a comp-c-piclib crypto
./usr/lib/libdns_pic.a comp-bind-piclib
./usr/lib/libedit_pic.a comp-c-piclib
./usr/lib/libevent_pic.a comp-c-piclib
./usr/lib/libform_pic.a comp-c-piclib
@ -27,6 +29,9 @@
./usr/lib/libhdb_pic.a comp-c-piclib kerberos
./usr/lib/libintl_pic.a comp-c-piclib
./usr/lib/libipsec_pic.a comp-c-piclib
./usr/lib/libisc_pic.a comp-bind-piclib
./usr/lib/libisccc_pic.a comp-bind-piclib
./usr/lib/libisccfg_pic.a comp-bind-piclib
./usr/lib/libiscsi_pic.a comp-c-piclib iscsi
./usr/lib/libkadm5clnt_pic.a comp-c-piclib kerberos
./usr/lib/libkadm5srv_pic.a comp-c-piclib kerberos
@ -37,6 +42,7 @@
./usr/lib/libkrb_pic.a comp-c-piclib obsolete
./usr/lib/libkstream_pic.a comp-c-piclib obsolete
./usr/lib/libkvm_pic.a comp-c-piclib
./usr/lib/liblwres_pic.a comp-bind-piclib
./usr/lib/libm_pic.a comp-c-piclib
./usr/lib/libmagic_pic.a comp-c-piclib
./usr/lib/libmenu_pic.a comp-c-piclib

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.117 2007/07/29 17:06:00 joerg Exp $
# $NetBSD: Makefile,v 1.118 2007/11/04 23:28:17 tls Exp $
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
.include <bsd.own.mk>
@ -10,6 +10,12 @@ SUBDIR= csu libc .WAIT libarch libbsdmalloc libbluetooth libbz2 \
libpthread_dbg libpuffs libresolv librmt librpcsvc librt libsdp \
libterm libusbhid libutil libwrap liby libz
# XXX These bind9/ISC libraries should depend on each other but the
# XXX dependency ordering requires considerable investigation.
# XXX Please preserve the order below so we know the order ISC links
# XXX them in in their Makefiles.
SUBDIR+= libbind9 libdns liblwres libisccfg libisccc libisc
.if (${MKSKEY} != "no")
SUBDIR+= libskey
.endif

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/05/18 00:06:58 christos Exp $
# $NetBSD: Makefile,v 1.1 2007/11/04 23:28:17 tls Exp $
LIB=bind9
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.include "${NETBSDSRCDIR}/usr.sbin/bind/Makefile.inc"
DIST= ${IDIST}/lib/bind9
.include "${DIST}/api"

View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2007/11/04 23:28:18 tls Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -1,16 +1,16 @@
# $NetBSD: Makefile,v 1.5 2007/04/08 09:36:35 scw Exp $
# $NetBSD: Makefile,v 1.1 2007/11/04 23:28:18 tls Exp $
LIB=dns
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.include "${NETBSDSRCDIR}/usr.sbin/bind/Makefile.inc"
DIST= ${IDIST}/lib/dns
.include "${DIST}/api"
.PATH.c: ${DIST}/unix ${DIST}/sec/dst ${DIST}
CPPFLAGS+=-I${.CURDIR}/../include/dns -I${DIST}
CPPFLAGS+= -I${BIND_SRCDIR}/include/dns -I${DIST}
.if ${HAVE_GCC} == 4
.for f in lookup byaddr request sdb validator

5
lib/libdns/shlib_version Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2007/11/04 23:28:18 tls Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.3 2007/01/27 21:36:13 christos Exp $
# $NetBSD: Makefile,v 1.1 2007/11/04 23:28:18 tls Exp $
LIB=isc
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.include "${NETBSDSRCDIR}/usr.sbin/bind/Makefile.inc"
DIST= ${IDIST}/lib/isc
.include "${DIST}/api"

5
lib/libisc/shlib_version Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2007/11/04 23:28:18 tls Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/05/18 00:06:58 christos Exp $
# $NetBSD: Makefile,v 1.1 2007/11/04 23:28:19 tls Exp $
LIB=isccc
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.include "${NETBSDSRCDIR}/usr.sbin/bind/Makefile.inc"
DIST= ${IDIST}/lib/isccc
.include "${DIST}/api"

View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2007/11/04 23:28:19 tls Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.2 2007/01/27 21:36:13 christos Exp $
# $NetBSD: Makefile,v 1.1 2007/11/04 23:28:19 tls Exp $
LIB=isccfg
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.include "${NETBSDSRCDIR}/usr.sbin/bind/Makefile.inc"
DIST= ${IDIST}/lib/isccfg
.include "${DIST}/api"

View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2007/11/04 23:28:19 tls Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/05/18 00:06:58 christos Exp $
# $NetBSD: Makefile,v 1.1 2007/11/04 23:28:19 tls Exp $
LIB=lwres
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.include "${NETBSDSRCDIR}/usr.sbin/bind/Makefile.inc"
DIST= ${IDIST}/lib/lwres
.include "${DIST}/api"

View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2007/11/04 23:28:19 tls Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.prog.mk,v 1.221 2007/07/29 17:06:02 joerg Exp $
# $NetBSD: bsd.prog.mk,v 1.222 2007/11/04 23:28:20 tls Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.ifndef HOSTPROG
@ -72,7 +72,7 @@ LIBCRT0= ${DESTDIR}/usr/lib/crt0.o
kadm5clnt kadm5srv kafs krb5 kvm l \
m magic menu objc ossaudio pam pcap pci pmc posix pthread pthread_dbg \
puffs radius resolv rmt roken rpcsvc rt sdp skey sl ss ssh ssl termcap \
usbhid util wrap y z
usbhid util wrap y z bind9 dns lwres isccfg isccc isc
.ifndef LIB${_lib:tu}
LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a
.MADE: ${LIB${_lib:tu}} # Note: ${DESTDIR} will be expanded

View File

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.15 2005/11/19 02:09:27 christos Exp $
# $NetBSD: Makefile,v 1.16 2007/11/04 23:28:20 tls Exp $
SUBDIR= libbind9 libdns libisc libisccc libisccfg liblwres .WAIT \
html dig host named nslookup nsupdate rndc rndc-confgen dnssec check
SUBDIR= html dig host named nslookup nsupdate rndc rndc-confgen dnssec check
.include "Makefile.inc"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.28 2007/05/28 12:06:33 tls Exp $
# $NetBSD: Makefile.inc,v 1.29 2007/11/04 23:28:20 tls Exp $
.if !defined(BIND9_MAKEFILE_INC)
BIND9_MAKEFILE_INC=yes
@ -48,31 +48,25 @@ CPPFLAGS+= -DWANT_IPV6
COPTS+= -Wno-pointer-sign
.endif
.if !defined(LIB) || empty(LIB) # {
.if !defined(LIB) || empty(LIB)
# NOTE: the order of these libraries is important...
.for _LL in bind9 dns lwres isccfg isccc isc
.if !defined(BOBJDIR.${_LL})
BOBJDIR.${_LL}!=cd ${BIND_SRCDIR}/lib${_LL} && ${PRINTOBJDIR}
.MAKEOVERRIDES+=BOBJDIR.${_LL}
LDADD+= -lbind9 -ldns -llwres -lisccfg -lisccc -lisc
DPADD+= ${LIBBIND9} ${LIBDNS} ${LIBLWRES}
DPADD+= ${LIBISCCFG} ${LIBISCCC} ${LIBISC}
.else
CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
.endif
LDADD+= -L${BOBJDIR.${_LL}} -l${_LL}
DPADD+= ${BOBJDIR.${_LL}}/lib${_LL}.a
.endfor
.if ${NAMED_USE_PTHREADS} == "yes"
LDADD+= -lpthread
DPADD+= ${LIBPTHREAD}
.endif
.else # }
MKPRIVATELIB=yes
CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
DPADD+= ${LIBPTHREAD} # XXX defined in bsd.prog.mk doesn't work for src/lib
.endif
.if ${NAMED_USE_OPENSSL} == "yes"
CPPFLAGS+=-DOPENSSL
LDADD+= -lcrypto
DPADD+= ${LIBCRYPTO}
DPADD+= ${LIBCRYPTO} # XXX see above
.endif
.if ${NAMED_USE_PTHREADS} == "yes"