diff options
author | Richard Yao <[email protected]> | 2013-09-26 13:42:41 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-10-10 16:56:51 -0700 |
commit | 31fc19399e597e3391f19f1392ab120f1de0d5f2 (patch) | |
tree | d2a559a1071ac6f65d5f5b321827472c470d5036 /cmd/zstreamdump | |
parent | 1db7b9be75a225cedb3b7a60028ca5695e5b8346 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1751
Diffstat (limited to 'cmd/zstreamdump')
-rw-r--r-- | cmd/zstreamdump/Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zstreamdump/Makefile.am b/cmd/zstreamdump/Makefile.am index 3d7ec4124..175874ffa 100644 --- a/cmd/zstreamdump/Makefile.am +++ b/cmd/zstreamdump/Makefile.am @@ -15,4 +15,4 @@ zstreamdump_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zstreamdump_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) +zstreamdump_LDADD += $(ZLIB) |