Author: rmh Date: Sun Oct 30 16:29:04 2011 New Revision: 226940 URL: http://svn.freebsd.org/changeset/base/226940
Log: Fix a few gratuitous library dependencies. Some of the ZFS utilities are linked with libraries they don't use: - zinject doesn't use libavl - ztest doesn't use libz - zdb uses neither libavl nor libz - zfs uses neither libbsdxml nor libm, nor libsbuf - zpool uses neither libbsdxml nor libm, nor libsbuf In addition, libzfs needs libm because it uses pow(), however it isn't linked with -lm. This went unnoticed because all its users had -lm before. Reviewed by: pjd, mm Approved by: kib (mentor) MFC after: 1 week Modified: head/cddl/lib/libzfs/Makefile head/cddl/sbin/zfs/Makefile head/cddl/sbin/zpool/Makefile head/cddl/usr.bin/zinject/Makefile head/cddl/usr.bin/ztest/Makefile head/cddl/usr.sbin/zdb/Makefile Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Sun Oct 30 15:21:27 2011 (r226939) +++ head/cddl/lib/libzfs/Makefile Sun Oct 30 16:29:04 2011 (r226940) @@ -6,8 +6,8 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common LIB= zfs -DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} -LDADD= -lmd -lpthread -lumem -lutil +DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} +LDADD= -lmd -lpthread -lumem -lutil -lm SRCS= deviceid.c \ fsshare.c \ Modified: head/cddl/sbin/zfs/Makefile ============================================================================== --- head/cddl/sbin/zfs/Makefile Sun Oct 30 15:21:27 2011 (r226939) +++ head/cddl/sbin/zfs/Makefile Sun Oct 30 16:29:04 2011 (r226940) @@ -21,8 +21,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \ +DPADD= ${LIBGEOM} ${LIBNVPAIR} ${LIBUMEM} \ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs +LDADD= -lgeom -lnvpair -lumem -lutil -luutil -lzfs .include <bsd.prog.mk> Modified: head/cddl/sbin/zpool/Makefile ============================================================================== --- head/cddl/sbin/zpool/Makefile Sun Oct 30 15:21:27 2011 (r226939) +++ head/cddl/sbin/zpool/Makefile Sun Oct 30 16:29:04 2011 (r226940) @@ -26,8 +26,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common -DPADD= ${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \ +DPADD= ${LIBAVL} ${LIBGEOM} ${LIBNVPAIR} \ ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lavl -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs +LDADD= -lavl -lgeom -lnvpair -lumem -lutil -luutil -lzfs .include <bsd.prog.mk> Modified: head/cddl/usr.bin/zinject/Makefile ============================================================================== --- head/cddl/usr.bin/zinject/Makefile Sun Oct 30 15:21:27 2011 (r226939) +++ head/cddl/usr.bin/zinject/Makefile Sun Oct 30 16:29:04 2011 (r226940) @@ -19,8 +19,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ +DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ ${LIBZFS} ${LIBZPOOL} -LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool +LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool .include <bsd.prog.mk> Modified: head/cddl/usr.bin/ztest/Makefile ============================================================================== --- head/cddl/usr.bin/ztest/Makefile Sun Oct 30 15:21:27 2011 (r226939) +++ head/cddl/usr.bin/ztest/Makefile Sun Oct 30 16:29:04 2011 (r226940) @@ -18,8 +18,8 @@ CFLAGS+= -I${.CURDIR}/../../contrib/open CFLAGS+= -I${.CURDIR}/../../lib/libumem DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ - ${LIBPTHREAD} ${LIBZ} ${LIBAVL} -LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl + ${LIBPTHREAD} ${LIBAVL} +LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lavl CSTD= c99 Modified: head/cddl/usr.sbin/zdb/Makefile ============================================================================== --- head/cddl/usr.sbin/zdb/Makefile Sun Oct 30 15:21:27 2011 (r226939) +++ head/cddl/usr.sbin/zdb/Makefile Sun Oct 30 16:29:04 2011 (r226940) @@ -23,9 +23,9 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ - ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL} -LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool +DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ + ${LIBUUTIL} ${LIBZFS} ${LIBZPOOL} +LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs -lzpool .include <bsd.prog.mk> _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"