svn commit: r240959 - in stable/9/cddl: lib/libzfs sbin/zfs sbin/zpool usr.bin/zinject usr.bin/ztest usr.sbin/zdb

Martin Matuska mm at FreeBSD.org
Wed Sep 26 12:36:10 UTC 2012


Author: mm
Date: Wed Sep 26 12:36:09 2012
New Revision: 240959
URL: http://svn.freebsd.org/changeset/base/240959

Log:
  MFC r226940 (rmh):
  
  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.

Modified:
  stable/9/cddl/lib/libzfs/Makefile
  stable/9/cddl/sbin/zfs/Makefile
  stable/9/cddl/sbin/zpool/Makefile
  stable/9/cddl/usr.bin/zinject/Makefile
  stable/9/cddl/usr.bin/ztest/Makefile
  stable/9/cddl/usr.sbin/zdb/Makefile
Directory Properties:
  stable/9/cddl/   (props changed)
  stable/9/cddl/lib/   (props changed)

Modified: stable/9/cddl/lib/libzfs/Makefile
==============================================================================
--- stable/9/cddl/lib/libzfs/Makefile	Wed Sep 26 11:12:09 2012	(r240958)
+++ stable/9/cddl/lib/libzfs/Makefile	Wed Sep 26 12:36:09 2012	(r240959)
@@ -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: stable/9/cddl/sbin/zfs/Makefile
==============================================================================
--- stable/9/cddl/sbin/zfs/Makefile	Wed Sep 26 11:12:09 2012	(r240958)
+++ stable/9/cddl/sbin/zfs/Makefile	Wed Sep 26 12:36:09 2012	(r240959)
@@ -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: stable/9/cddl/sbin/zpool/Makefile
==============================================================================
--- stable/9/cddl/sbin/zpool/Makefile	Wed Sep 26 11:12:09 2012	(r240958)
+++ stable/9/cddl/sbin/zpool/Makefile	Wed Sep 26 12:36:09 2012	(r240959)
@@ -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: stable/9/cddl/usr.bin/zinject/Makefile
==============================================================================
--- stable/9/cddl/usr.bin/zinject/Makefile	Wed Sep 26 11:12:09 2012	(r240958)
+++ stable/9/cddl/usr.bin/zinject/Makefile	Wed Sep 26 12:36:09 2012	(r240959)
@@ -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: stable/9/cddl/usr.bin/ztest/Makefile
==============================================================================
--- stable/9/cddl/usr.bin/ztest/Makefile	Wed Sep 26 11:12:09 2012	(r240958)
+++ stable/9/cddl/usr.bin/ztest/Makefile	Wed Sep 26 12:36:09 2012	(r240959)
@@ -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: stable/9/cddl/usr.sbin/zdb/Makefile
==============================================================================
--- stable/9/cddl/usr.sbin/zdb/Makefile	Wed Sep 26 11:12:09 2012	(r240958)
+++ stable/9/cddl/usr.sbin/zdb/Makefile	Wed Sep 26 12:36:09 2012	(r240959)
@@ -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>


More information about the svn-src-stable-9 mailing list