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 | |
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')
-rw-r--r-- | cmd/mount_zfs/Makefile.am | 6 | ||||
-rw-r--r-- | cmd/raidz_test/Makefile.am | 4 | ||||
-rw-r--r-- | cmd/zdb/Makefile.am | 6 | ||||
-rw-r--r-- | cmd/zed/Makefile.am | 8 | ||||
-rw-r--r-- | cmd/zfs/Makefile.am | 8 | ||||
-rw-r--r-- | cmd/zfs_ids_to_path/Makefile.am | 2 | ||||
-rw-r--r-- | cmd/zhack/Makefile.am | 6 | ||||
-rw-r--r-- | cmd/zinject/Makefile.am | 6 | ||||
-rw-r--r-- | cmd/zpool/Makefile.am | 8 | ||||
-rw-r--r-- | cmd/zstream/Makefile.am | 6 | ||||
-rw-r--r-- | cmd/ztest/Makefile.am | 6 |
11 files changed, 33 insertions, 33 deletions
diff --git a/cmd/mount_zfs/Makefile.am b/cmd/mount_zfs/Makefile.am index ed3208a9a..6c4d6ff79 100644 --- a/cmd/mount_zfs/Makefile.am +++ b/cmd/mount_zfs/Makefile.am @@ -13,8 +13,8 @@ mount_zfs_SOURCES = \ mount_zfs.c mount_zfs_LDADD = \ - $(top_builddir)/lib/libzfs/libzfs.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la + $(abs_top_builddir)/lib/libzfs/libzfs.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la mount_zfs_LDADD += $(LTLIBINTL) diff --git a/cmd/raidz_test/Makefile.am b/cmd/raidz_test/Makefile.am index 387cc7d8a..ccfa7019c 100644 --- a/cmd/raidz_test/Makefile.am +++ b/cmd/raidz_test/Makefile.am @@ -14,7 +14,7 @@ raidz_test_SOURCES = \ raidz_bench.c raidz_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 raidz_test_LDADD += -lm diff --git a/cmd/zdb/Makefile.am b/cmd/zdb/Makefile.am index 68de8ea3c..7a29e54f6 100644 --- a/cmd/zdb/Makefile.am +++ b/cmd/zdb/Makefile.am @@ -11,6 +11,6 @@ zdb_SOURCES = \ zdb.h zdb_LDADD = \ - $(top_builddir)/lib/libzpool/libzpool.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la + $(abs_top_builddir)/lib/libzpool/libzpool.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la diff --git a/cmd/zed/Makefile.am b/cmd/zed/Makefile.am index 89b4d899b..4bd8ac4a5 100644 --- a/cmd/zed/Makefile.am +++ b/cmd/zed/Makefile.am @@ -38,10 +38,10 @@ FMA_SRC = \ zed_SOURCES = $(ZED_SRC) $(FMA_SRC) zed_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 zed_LDADD += -lrt $(LIBUDEV_LIBS) $(LIBUUID_LIBS) zed_LDFLAGS = -pthread 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) diff --git a/cmd/zfs_ids_to_path/Makefile.am b/cmd/zfs_ids_to_path/Makefile.am index c509a3862..176eeb3c7 100644 --- a/cmd/zfs_ids_to_path/Makefile.am +++ b/cmd/zfs_ids_to_path/Makefile.am @@ -6,4 +6,4 @@ zfs_ids_to_path_SOURCES = \ zfs_ids_to_path.c zfs_ids_to_path_LDADD = \ - $(top_builddir)/lib/libzfs/libzfs.la + $(abs_top_builddir)/lib/libzfs/libzfs.la diff --git a/cmd/zhack/Makefile.am b/cmd/zhack/Makefile.am index 3f6ef1215..6c5b5d096 100644 --- a/cmd/zhack/Makefile.am +++ b/cmd/zhack/Makefile.am @@ -6,6 +6,6 @@ zhack_SOURCES = \ zhack.c zhack_LDADD = \ - $(top_builddir)/lib/libzpool/libzpool.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la + $(abs_top_builddir)/lib/libzpool/libzpool.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la diff --git a/cmd/zinject/Makefile.am b/cmd/zinject/Makefile.am index 7c4a5fdbb..091d92cd6 100644 --- a/cmd/zinject/Makefile.am +++ b/cmd/zinject/Makefile.am @@ -8,6 +8,6 @@ zinject_SOURCES = \ zinject.h zinject_LDADD = \ - $(top_builddir)/lib/libzfs/libzfs.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la + $(abs_top_builddir)/lib/libzfs/libzfs.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am index cd847a170..c0378b136 100644 --- a/cmd/zpool/Makefile.am +++ b/cmd/zpool/Makefile.am @@ -22,10 +22,10 @@ zpool_SOURCES += os/linux/zpool_vdev_os.c endif zpool_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 zpool_LDADD += $(LTLIBINTL) diff --git a/cmd/zstream/Makefile.am b/cmd/zstream/Makefile.am index a3b678d0a..5e0312f23 100644 --- a/cmd/zstream/Makefile.am +++ b/cmd/zstream/Makefile.am @@ -9,6 +9,6 @@ zstream_SOURCES = \ zstream_redup.c zstream_LDADD = \ - $(top_builddir)/lib/libzfs/libzfs.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la + $(abs_top_builddir)/lib/libzfs/libzfs.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la diff --git a/cmd/ztest/Makefile.am b/cmd/ztest/Makefile.am index 4790e62ca..40d029d9f 100644 --- a/cmd/ztest/Makefile.am +++ b/cmd/ztest/Makefile.am @@ -15,9 +15,9 @@ ztest_SOURCES = \ ztest.c ztest_LDADD = \ - $(top_builddir)/lib/libzpool/libzpool.la \ - $(top_builddir)/lib/libzfs_core/libzfs_core.la \ - $(top_builddir)/lib/libnvpair/libnvpair.la + $(abs_top_builddir)/lib/libzpool/libzpool.la \ + $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ + $(abs_top_builddir)/lib/libnvpair/libnvpair.la ztest_LDADD += -lm ztest_LDFLAGS = -pthread |