]> granicus.if.org Git - zfs/commit
Generate libraries with correct DT_NEEDED entries
authorRichard Yao <ryao@gentoo.org>
Thu, 26 Sep 2013 17:42:41 +0000 (13:42 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 10 Oct 2013 23:56:51 +0000 (16:56 -0700)
commit31fc19399e597e3391f19f1392ab120f1de0d5f2
treed2a559a1071ac6f65d5f5b321827472c470d5036
parent1db7b9be75a225cedb3b7a60028ca5695e5b8346
Generate libraries with correct DT_NEEDED entries

Libraries that depend on other libraries should list them in ELF's
DT_NEEDED field so that programs linking to them do not need to specify
those libraries unless they depend on them as well. This is not the case
in the current code and the consequence is that anything that needs a
library must know its dependencies. This is fragile and caused GRUB2's
configure script to break when a dependency was added on libblkid in
libzfs.

This resolves that problem by using LIBADD/LDADD to specify libraries in
Makefile.am instead of LDFLAGS. This ensures that proper DT_NEEDED
entries are generated and prevents GRUB2's configure script from
breaking in the presence of a libblkid dependency. This also removes
unneeded dependencies from various files.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1751
13 files changed:
cmd/mount_zfs/Makefile.am
cmd/zdb/Makefile.am
cmd/zfs/Makefile.am
cmd/zhack/Makefile.am
cmd/zinject/Makefile.am
cmd/zpool/Makefile.am
cmd/zstreamdump/Makefile.am
cmd/ztest/Makefile.am
lib/libefi/Makefile.am
lib/libspl/Makefile.am
lib/libzfs/Makefile.am
lib/libzfs_core/Makefile.am
lib/libzpool/Makefile.am