diff options
author | Arvind Sankar <[email protected]> | 2020-07-06 16:01:29 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-07-10 14:26:32 -0700 |
commit | 3e597dee1128db8907a2b757c675c41cfdbf21aa (patch) | |
tree | 4854f380b44a21feb9fb9e2dc0664da2d9868db1 /cmd/zfs | |
parent | af6591622696bcb4e46702da07923e909db99f30 (diff) |
Use abs_top_builddir when referencing libraries
libtool stores absolute paths in the dependency_libs component of the
.la files. If the Makefile for a dependent library refers to the
libraries by relative path, some libraries end up duplicated on the link
command line.
As an example, libzfs specifies libzfs_core, libnvpair and libuutil as
dependencies to be linked in. The .la file for libzfs_core also
specifies libnvpair, but using an absolute path, with the result that
libnvpair is present twice in the linker command line for producing
libzfs.
While the only thing this causes is to slightly slow down the linking,
we can avoid it by using absolute paths everywhere, including for
convenience libraries just for consistency.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10538
Diffstat (limited to 'cmd/zfs')
-rw-r--r-- | cmd/zfs/Makefile.am | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/zfs/Makefile.am b/cmd/zfs/Makefile.am index 5c73477d2..dec592038 100644 --- a/cmd/zfs/Makefile.am +++ b/cmd/zfs/Makefile.am @@ -11,10 +11,10 @@ zfs_SOURCES = \ zfs_projectutil.h zfs_LDADD = \ - $(top_builddir)/lib/libzfs/libzfs.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la \ - $(top_builddir)/lib/libuutil/libuutil.la + $(abs_top_builddir)/lib/libzfs/libzfs.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la \ + $(abs_top_builddir)/lib/libuutil/libuutil.la zfs_LDADD += $(LTLIBINTL) |