summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-07-06 16:01:29 -0400
committerBrian Behlendorf <[email protected]>2020-07-10 14:26:32 -0700
commit3e597dee1128db8907a2b757c675c41cfdbf21aa (patch)
tree4854f380b44a21feb9fb9e2dc0664da2d9868db1 /tests
parentaf6591622696bcb4e46702da07923e909db99f30 (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 'tests')
-rw-r--r--tests/zfs-tests/cmd/btree_test/Makefile.am4
-rw-r--r--tests/zfs-tests/cmd/libzfs_input_check/Makefile.am4
-rw-r--r--tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am4
-rw-r--r--tests/zfs-tests/tests/functional/checksum/Makefile.am4
-rw-r--r--tests/zfs-tests/tests/functional/hkdf/Makefile.am2
-rw-r--r--tests/zfs-tests/tests/functional/libzfs/Makefile.am2
6 files changed, 10 insertions, 10 deletions
diff --git a/tests/zfs-tests/cmd/btree_test/Makefile.am b/tests/zfs-tests/cmd/btree_test/Makefile.am
index 55c40e3f5..0bb8f9917 100644
--- a/tests/zfs-tests/cmd/btree_test/Makefile.am
+++ b/tests/zfs-tests/cmd/btree_test/Makefile.am
@@ -28,5 +28,5 @@ pkgexec_PROGRAMS = btree_test
btree_test_SOURCES = btree_test.c
btree_test_LDADD = \
- $(top_builddir)/lib/libzpool/libzpool.la \
- $(top_builddir)/lib/libzfs_core/libzfs_core.la
+ $(abs_top_builddir)/lib/libzpool/libzpool.la \
+ $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la
diff --git a/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am b/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am
index 67fa98886..ba02f93fe 100644
--- a/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am
+++ b/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am
@@ -6,5 +6,5 @@ pkgexec_PROGRAMS = libzfs_input_check
libzfs_input_check_SOURCES = libzfs_input_check.c
libzfs_input_check_LDADD = \
- $(top_builddir)/lib/libzfs_core/libzfs_core.la \
- $(top_builddir)/lib/libnvpair/libnvpair.la
+ $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \
+ $(abs_top_builddir)/lib/libnvpair/libnvpair.la
diff --git a/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am b/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am
index c98e032e1..511b6c691 100644
--- a/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am
+++ b/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am
@@ -6,5 +6,5 @@ pkgexec_PROGRAMS = nvlist_to_lua
nvlist_to_lua_SOURCES = nvlist_to_lua.c
nvlist_to_lua_LDADD = \
- $(top_builddir)/lib/libzfs_core/libzfs_core.la \
- $(top_builddir)/lib/libnvpair/libnvpair.la
+ $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \
+ $(abs_top_builddir)/lib/libnvpair/libnvpair.la
diff --git a/tests/zfs-tests/tests/functional/checksum/Makefile.am b/tests/zfs-tests/tests/functional/checksum/Makefile.am
index 265a4b16e..3ad48ccd4 100644
--- a/tests/zfs-tests/tests/functional/checksum/Makefile.am
+++ b/tests/zfs-tests/tests/functional/checksum/Makefile.am
@@ -1,8 +1,8 @@
include $(top_srcdir)/config/Rules.am
LDADD = \
- $(top_builddir)/lib/libicp/libicp.la \
- $(top_builddir)/lib/libspl/libspl_assert.la
+ $(abs_top_builddir)/lib/libicp/libicp.la \
+ $(abs_top_builddir)/lib/libspl/libspl_assert.la
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/checksum
diff --git a/tests/zfs-tests/tests/functional/hkdf/Makefile.am b/tests/zfs-tests/tests/functional/hkdf/Makefile.am
index be65f8c0e..8ac905322 100644
--- a/tests/zfs-tests/tests/functional/hkdf/Makefile.am
+++ b/tests/zfs-tests/tests/functional/hkdf/Makefile.am
@@ -14,4 +14,4 @@ pkgexec_PROGRAMS = \
hkdf_test_SOURCES = hkdf_test.c
hkdf_test_LDADD = \
- $(top_builddir)/lib/libzpool/libzpool.la
+ $(abs_top_builddir)/lib/libzpool/libzpool.la
diff --git a/tests/zfs-tests/tests/functional/libzfs/Makefile.am b/tests/zfs-tests/tests/functional/libzfs/Makefile.am
index e9a703f49..53cb63544 100644
--- a/tests/zfs-tests/tests/functional/libzfs/Makefile.am
+++ b/tests/zfs-tests/tests/functional/libzfs/Makefile.am
@@ -10,7 +10,7 @@ dist_pkgdata_SCRIPTS = \
libzfs_input.ksh
many_fds_LDADD = \
- $(top_builddir)/lib/libzfs/libzfs.la
+ $(abs_top_builddir)/lib/libzfs/libzfs.la
pkgexec_PROGRAMS = many_fds
many_fds_SOURCES = many_fds.c