From 3e597dee1128db8907a2b757c675c41cfdbf21aa Mon Sep 17 00:00:00 2001 From: Arvind Sankar Date: Mon, 6 Jul 2020 16:01:29 -0400 Subject: 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 Signed-off-by: Arvind Sankar Closes #10538 --- lib/libnvpair/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libnvpair/Makefile.am') diff --git a/lib/libnvpair/Makefile.am b/lib/libnvpair/Makefile.am index 8d736f7b7..340e6d362 100644 --- a/lib/libnvpair/Makefile.am +++ b/lib/libnvpair/Makefile.am @@ -27,7 +27,7 @@ nodist_libnvpair_la_SOURCES = \ $(KERNEL_C) libnvpair_la_LIBADD = \ - $(top_builddir)/lib/libspl/libspl_assert.la + $(abs_top_builddir)/lib/libspl/libspl_assert.la libnvpair_la_LIBADD += $(LIBTIRPC_LIBS) $(LTLIBINTL) -- cgit v1.2.3